]> git.saurik.com Git - apt.git/commitdiff
* use gpg --with-colons
authorMichael Vogt <mvo@debian.org>
Fri, 24 Dec 2004 08:09:43 +0000 (08:09 +0000)
committerMichael Vogt <mvo@debian.org>
Fri, 24 Dec 2004 08:09:43 +0000 (08:09 +0000)
cmdline/apt-key

index ed5847c552b074855dd566dd2c184c2dde033a64..a96afe944f9efd078964c590ddb1f7d063f8dd22 100755 (executable)
@@ -24,10 +24,10 @@ update() {
     $GPG_CMD --quiet --batch --keyring $ARCHIVE_KEYRING --export | $GPG --import
 
     # remove no-longer used keys
-    keys=`$GPG_CMD --keyring $REMOVED_KEYS --list-keys|awk '/^pub/{print $2}'`
+    keys=`$GPG_CMD --keyring $REMOVED_KEYS --with-colons --list-keys|awk '/^pub/{FS=":";print $5}'`
     for key in $keys; do
-       if $GPG --list-keys | awk '/^pub/{print $2}'|grep -q $key; then
-           $GPG --quiet --batch --delete-key --yes "${key#*/}"
+       if $GPG --list-keys --with-colons | awk '/^pub/{FS=":";print $5}'|grep -q $key; then
+           $GPG --quiet --batch --delete-key --yes ${key}
        fi
     done
 }