Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts/repo-add.sh.in
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2016-02-21 19:06:37 +1000
committerAndrew Gregory <andrew.gregory.8@gmail.com>2017-04-27 22:21:33 -0400
commitcd7acd75299e3124424d92113ba0241d5f8b084b (patch)
treef6f7e9a97ce131b44f2b69d8edc630aace7ed75d /scripts/repo-add.sh.in
parent9bddaac93c927d00804094b365c798b81dc0b408 (diff)
repo-add: do not alter the database if only verifying signature
Fixes FS#48085. Signed-off-by: Allan McRae <allan@archlinux.org> (cherry picked from commit f363cf78575cc4c54dee5801274e55d07e0971b1)
Diffstat (limited to 'scripts/repo-add.sh.in')
-rw-r--r--scripts/repo-add.sh.in11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in
index cab5e048..d62f9c4d 100644
--- a/scripts/repo-add.sh.in
+++ b/scripts/repo-add.sh.in
@@ -798,6 +798,17 @@ fi
check_xdelta
+if (( VERIFY && ${#args[@]} == 1 )); then
+ for repo in "db" "files"; do
+ dbfile=${repodir}/$REPO_DB_PREFIX.$repo.$REPO_DB_SUFFIX
+
+ if [[ -f $dbfile ]]; then
+ verify_signature "$dbfile"
+ fi
+ done
+ exit 0
+fi
+
prepare_repo_db
for arg in "${args[@]:1}"; do