]> git.saurik.com Git - apt.git/blobdiff - cmdline/apt-key
* merged with mainline
[apt.git] / cmdline / apt-key
index ed5847c552b074855dd566dd2c184c2dde033a64..be2b19a1af87a79fc42030259b3f2e7b8e6eb592 100755 (executable)
@@ -21,13 +21,13 @@ update() {
     fi
 
     # add new keys
-    $GPG_CMD --quiet --batch --keyring $ARCHIVE_KEYRING --export | $GPG --import
+    $GPG_CMD --quiet --batch --keyring $ARCHIVE_KEYRING --export | $GPG --ignore-time-conflict --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
 }