From: myon-guest Date: Sun, 21 Aug 2005 17:28:13 +0000 (+0000) Subject: handle revoked uids in perl to get linecount right X-Git-Url: https://git.sthu.org/?a=commitdiff_plain;h=f1073482adc7c4989676dfc098dc8fb80864bebe;p=pgp-tools.git handle revoked uids in perl to get linecount right git-svn-id: svn://svn.debian.org/pgp-tools/trunk@219 b513b33f-fedd-0310-b452-c3deb5f4c849 --- diff --git a/debian/changelog b/debian/changelog index 226c8bf..e5fb00f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,8 @@ signing-party (0.4.2-2) UNRELEASED; urgency=low [ Christoph Berg ] - * + * gpg-key2ps: + + handle revoked uids in perl to get linecount right (Closes: #320785). [ Peter Palfrader ] * Install caff's pgp-fixkey. diff --git a/gpg-key2ps/gpg-key2ps b/gpg-key2ps/gpg-key2ps index 5b87585..9498e6b 100755 --- a/gpg-key2ps/gpg-key2ps +++ b/gpg-key2ps/gpg-key2ps @@ -165,8 +165,6 @@ if ( $revokestyle eq "grey" ) { print " uid\n"; print " 0 setgray\n"; print "} def\n"; -} elsif ( $revokestyle eq "hide" ) { - print "/revuid {} def\n"; } elsif ( $revokestyle eq "note" ) { print "/revuid {\n"; print " 50 y moveto (uid) show\n"; @@ -223,7 +221,9 @@ while() { # user ids s/^uid:[^:r]*:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:([^:]*):.*/ ($1) uid/; # revoked user id - s/^uid:r[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:([^:]*):.*/ ($1) revuid/; + if (s/^uid:r[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:([^:]*):.*/ ($1) revuid/) { + next if $revokestyle eq "hide"; + } # subkey s/^sub:[^:]*:([^:]*):([0-9]*):.{8,8}(.{8,8}):([^:]*):[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:.*/ ($4) ($3) $2 ($1) sbk/; $numlines++; @@ -237,6 +237,8 @@ unless ($started) { exit 1; } +print STDERR "numlines $numlines\n"; + # output the remaining postscript print <