Gentoo Archives: gentoo-commits

From: "Robin H. Johnson" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/qa-scripts:master commit in: /
Date: Sat, 29 Jun 2019 03:51:59
Message-Id: 1561780277.6781035b122cfae1b111f332cba5fe2608f4b59e.robbat2@gentoo
1 commit: 6781035b122cfae1b111f332cba5fe2608f4b59e
2 Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jun 29 03:51:17 2019 +0000
4 Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
5 CommitDate: Sat Jun 29 03:51:17 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=6781035b
7
8 keyrings.inc.bash: handle emtpy set of keyservers passed
9
10 Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
11
12 keyrings.inc.bash | 4 ++++
13 1 file changed, 4 insertions(+)
14
15 diff --git a/keyrings.inc.bash b/keyrings.inc.bash
16 index a3879d5..5ed1fbb 100644
17 --- a/keyrings.inc.bash
18 +++ b/keyrings.inc.bash
19 @@ -29,6 +29,8 @@ grab_keys() {
20 local remaining=( "${@}" )
21
22 KEYSERVER_TIMEOUT=${KEYSERVER_TIMEOUT:=1m}
23 + # quickly handle empty keyservers set
24 + [ "${#KEYSERVERS[@]}" -eq 0 ] && return
25 while :; do
26 for ks in "${KEYSERVERS[@]}" ; do
27 timeout ${KEYSERVER_TIMEOUT} gpg --keyserver "$ks" -q --recv-keys "${remaining[@]}" || :
28 @@ -56,6 +58,8 @@ grab_keys() {
29
30 # push_keys <fingerprint>...
31 push_keys() {
32 + # quickly handle empty keyservers set
33 + [ "${#KEYSERVERS[@]}" -eq 0 ] && return
34 # Only send keys that we have
35 local remaining=( $(gpg --with-colon --list-public "${@}" | sed -n '/^pub/{n; /fpr/p }' |cut -d: -f10) )
36 KEYSERVER_TIMEOUT=${KEYSERVER_TIMEOUT:=1m}