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 <[EMAIL PROTECTED]>" 1 new user ID
gpg: key 7032F238: "Jon Dowland <[EMAIL PROTECTED]>" 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*

Attachment: signature.asc
Description: Digital signature

Reply via email to