diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2009-12-10 23:05:23 +0100 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2009-12-10 23:05:23 +0100 |
commit | f932cd7c75cd7b0da99c97064f8d112075ccd7f5 (patch) | |
tree | 6018c4ae9c4f4c3d2cd0abb8b3f0fb7b4094524b /cmdline/apt-key | |
parent | c6474fb6ff482b0457674986a82afab0a3749af2 (diff) | |
parent | 43be0ac4b37f3a82ae4a16e473c3d8e44637ce1b (diff) |
merge with lp:~mvo/apt/debian-sid : move all my ABI break changes
to the "new" 0.7.26 version
Diffstat (limited to 'cmdline/apt-key')
-rwxr-xr-x | cmdline/apt-key | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/cmdline/apt-key b/cmdline/apt-key index 7bb30240e..5f4e02fdf 100755 --- a/cmdline/apt-key +++ b/cmdline/apt-key @@ -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 } |