[D-m-team] Bug#505775: debian-maintainers: keycheck fails if jetring-apply lists more than one line with "^gpg: key"
Aníbal Monsalve Salazar
anibal at debian.org
Sat Nov 15 05:32:39 UTC 2008
Package: debian-maintainers
Version: 1.47
Tags: patch
While checking the changeset of #476804, keycheck failed as so:
./keycheck~ update-jon.dowland
make: Nothing to be done for `all'.
Updating Debian keyring cache
Checking key id 7032F238
7032F238
Adding KeyCheck field to update-jon.dowland
And it inserted the following two lines in the changeset:
KeyCheck:
gpg: error reading key: public key not found
The cause of the error is that the key being checked is:
'7032F238
7032F238'
Which is the result of:
cp debian-maintainers.gpg ./keyring.tmp; jetring-apply ./keyring.tmp update-jon.dowland 2>&1 | grep '^gpg: key' | sed 's/^gpg: key \([a-fA-F0-9]*\):.*/\1/'
7032F238
7032F238
Running the one line command above without the sed:
cp debian-maintainers.gpg ./keyring.tmp; jetring-apply ./keyring.tmp update-jon.dowland 2>&1 | grep '^gpg: key'
gpg: key 7032F238: "Jon Dowland <jon at alcopop.org>" 1 new user ID
gpg: key 7032F238: "Jon Dowland <jon at alcopop.org>" 17 new signatures
The following patch fixes this bug.
--- keycheck~ 2008-06-29 20:34:58.000000000 +1000
+++ keycheck 2008-11-15 16:09:17.000000000 +1100
@@ -63,7 +63,7 @@ keycheck () {
make
cp debian-maintainers.gpg $TMPRING
-KEYID=$(jetring-apply $TMPRING "$changeset" 2>&1 | grep '^gpg: key' | sed 's/^gpg: key \([a-fA-F0-9]*\):.*/\1/')
+KEYID=$(jetring-apply $TMPRING "$changeset" 2>&1 | grep -m 1 '^gpg: key' | sed 's/^gpg: key \([a-fA-F0-9]*\):.*/\1/')
if [ -z "$KEYID" ]; then
echo "Changeset failed to apply, or failed to parse key id from gpg output" >&2
rm -f $TMPRING*
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/d-m-team/attachments/20081115/114a94e5/attachment.pgp
More information about the D-m-team
mailing list