[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[dak/master] buildd add keys



ignore the gpg error message, redirecting to dev/null. can appear if we have a new arch/buildd, then its a key-not-found complaint, which we dont care about. and we also care nothing about any other error it might give us here, so off it goes

also log if we have too many keys

Signed-off-by: Joerg Jaspert <joerg@debian.org>
---
 scripts/debian/buildd-add-keys |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/scripts/debian/buildd-add-keys b/scripts/debian/buildd-add-keys
index 619a514..b141cc8 100755
--- a/scripts/debian/buildd-add-keys
+++ b/scripts/debian/buildd-add-keys
@@ -274,8 +274,9 @@ for file in ${KEYS}; do
     # We need to check for the amount of keys
     ARCHKEYRING="${base}/${ARCH}/keyring.gpg"
 
-    KEYNO=$(gpg ${DEFGPGOPT} --keyring "${ARCHKEYRING}" --with-colons --list-keys "buildd_${ARCH}-${BUILDD}@buildd.debian.org" | grep -c '^pub:' || /bin/true )
+    KEYNO=$(gpg ${DEFGPGOPT} --keyring "${ARCHKEYRING}" --with-colons --list-keys "buildd_${ARCH}-${BUILDD}@buildd.debian.org" 2>/dev/null | grep -c '^pub:' || /bin/true )
     if [ ${KEYNO} -gt 2 ]; then
+        log "Too many keys for ${ARCH} buildd ${BUILDD}"
         DATE=$(date -Is)
         mv "${INCOMING}/${file}" "${ERRORS}/toomany.${file}.${DATE}"
         mv "${GPGSTATUS}" "${ERRORS}/toomany.${file}.gpgstatus.${DATE}"
-- 
1.7.2.5


Reply to: