From 160f5bec8c561fdb49aad73903fa4d7119185b67 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Wed, 25 Aug 2021 21:42:22 +0100 Subject: [PATCH] pacman-key: Add --quiet to a few more gpg invocations Currently, when running pacman-key --populate, gpg prints the trustdb check output once for each locally signed and revoked key. When bootstrapping a new container image, about 50 keys get signed and revoked which leads to a huge amount of output when running pacman-key which is repeated 50x. To avoid overloading the user with gpg output, we add --quiet to the gpg calls generating the trustdb checking output to silence those calls which gets rid of the trustdb check output on the terminal. Signed-off-by: Daan De Meyer Signed-off-by: Allan McRae --- scripts/pacman-key.sh.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/pacman-key.sh.in b/scripts/pacman-key.sh.in index 50342649..0526532f 100644 --- a/scripts/pacman-key.sh.in +++ b/scripts/pacman-key.sh.in @@ -192,7 +192,7 @@ check_keyids_exist() { } key_is_lsigned() { - secret_key=$("${GPG_PACMAN[@]}" --with-colons --list-secret-key | awk -F : 'NR==1 {print $5}') + secret_key=$("${GPG_PACMAN[@]}" --with-colons --list-secret-key --quiet | awk -F : 'NR==1 {print $5}') while IFS=: read -r type valid _ _ sign_key _; do if [[ $type != "sig" || $valid != "!" ]]; then continue @@ -200,7 +200,7 @@ key_is_lsigned() { if [[ "$sign_key" == "$secret_key" ]]; then return 0 fi - done < <("${GPG_PACMAN[@]}" --with-colons --check-signatures "$1") + done < <("${GPG_PACMAN[@]}" --with-colons --check-signatures --quiet "$1") return 1 } @@ -212,7 +212,7 @@ key_is_revoked() { if [[ $flags == *"D"* ]]; then return 0 fi - done < <("${GPG_PACMAN[@]}" --with-colons --list-key "$1") + done < <("${GPG_PACMAN[@]}" --with-colons --list-key --quiet "$1") return 1 }