* cmdline/apt-key:
authorMichael Vogt <michael.vogt@ubuntu.com>
Thu, 24 Sep 2009 09:55:46 +0000 (11:55 +0200)
committerMichael Vogt <michael.vogt@ubuntu.com>
Thu, 24 Sep 2009 09:55:46 +0000 (11:55 +0200)
  - Emit a warning if removed keys keyring is missing and skip associated
    checks (LP: #218971)

cmdline/apt-key
debian/changelog

index 7bb3024..5f4e02f 100755 (executable)
@@ -93,13 +93,17 @@ update() {
     # add any security. we *need* this check on net-update though
     $GPG_CMD --quiet --batch --keyring $ARCHIVE_KEYRING --export | $GPG --import
 
-    # remove no-longer supported/used keys
-    keys=`$GPG_CMD --keyring $REMOVED_KEYS --with-colons --list-keys | grep ^pub | cut -d: -f5`
-    for key in $keys; do
-       if $GPG --list-keys --with-colons | grep ^pub | cut -d: -f5 | grep -q $key; then
-           $GPG --quiet --batch --delete-key --yes ${key}
-       fi
-    done
+    if [ -r "$REMOVED_KEYS" ]; then
+       # remove no-longer supported/used keys
+       keys=`$GPG_CMD --keyring $REMOVED_KEYS --with-colons --list-keys | grep ^pub | cut -d: -f5`
+       for key in $keys; do
+           if $GPG --list-keys --with-colons | grep ^pub | cut -d: -f5 | grep -q $key; then
+               $GPG --quiet --batch --delete-key --yes ${key}
+           fi
+       done
+    else
+       echo "Warning: removed keys keyring  $REMOVED_KEYS missing or not readable" >&2
+    fi
 }
 
 
index cad2238..16e8929 100644 (file)
@@ -1,11 +1,17 @@
 apt (0.7.22.4) unstable; urgency=low
 
+  [ Michael Vogt ]
   * apt-pkg/deb/dpkgpm.cc:
     - when tcgetattr() returns non-zero skip all pty magic 
       (thanks to Simon Richter, closes: #509866)
   * apt-inst/contrib/arfile.cc:
     - show propper error message for Invalid archive members
 
+  [ Loïc Minier ]
+  * cmdline/apt-key:
+    - Emit a warning if removed keys keyring is missing and skip associated
+      checks (LP: #218971)
+
  -- Michael Vogt <michael.vogt@ubuntu.com>  Mon, 31 Aug 2009 11:08:03 +0200
 
 apt (0.7.22.3) UNRELEASED; urgency=low