diff options
author | Loïc Minier <lool@dooz.org> | 2009-08-28 12:03:39 +0200 |
---|---|---|
committer | Loïc Minier <lool@dooz.org> | 2009-08-28 12:03:39 +0200 |
commit | a69a3a044be84f72508fb468cdf13d9e5f724dd4 (patch) | |
tree | 3633f865853cd3fe425dab97289adece4f4319b2 | |
parent | f408836a80f20359c87d8815608af651199e3d73 (diff) |
* cmdline/apt-key:
- Emit a warning if removed keys keyring is missing and skip associated
checks (LP: #218971)
-rwxr-xr-x | cmdline/apt-key | 18 | ||||
-rw-r--r-- | debian/changelog | 5 |
2 files changed, 16 insertions, 7 deletions
diff --git a/cmdline/apt-key b/cmdline/apt-key index 26aa55633..b579e5a53 100755 --- a/cmdline/apt-key +++ b/cmdline/apt-key @@ -90,13 +90,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 } diff --git a/debian/changelog b/debian/changelog index dbd8fe5b3..160210dac 100644 --- a/debian/changelog +++ b/debian/changelog @@ -24,6 +24,11 @@ apt (0.7.22.3) UNRELEASED; urgency=low * cmdline/apt-get.cc: - typo fix (LP: #370094) + [ Loïc Minier ] + * cmdline/apt-key: + - Emit a warning if removed keys keyring is missing and skip associated + checks (LP: #218971) + -- Michael Vogt <mvo@debian.org> Wed, 19 Aug 2009 11:14:15 +0200 apt (0.7.22.2) unstable; urgency=low |