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>
# 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}"