]> git.saurik.com Git - apt.git/commitdiff
apt-key: ignore any error produced by gpgconf --kill
authorDavid Kalnischkies <david@kalnischkies.de>
Sun, 31 Jul 2016 08:29:25 +0000 (10:29 +0200)
committerDavid Kalnischkies <david@kalnischkies.de>
Sun, 31 Jul 2016 08:29:25 +0000 (10:29 +0200)
gpgconf wasn't always equipped with a --kill option as highlighted by
our testcases failing on Travis and co as these use a much older version
of gpg2. As this is just for cleaning up slightly faster we ignore any
error a call might produce and carry on. Use a recent enough gpg2
version if you need the immediate killing…

Gbp-Dch: Ignore
Reported-By: Travis CI
cmdline/apt-key.in

index 80aacfa5e42d39ba77580ae1c5702468373dbf4b..0f9118492197e144fc18fd4e7e723bc71973ba73 100644 (file)
@@ -483,7 +483,7 @@ shift
 cleanup_gpg_home() {
     if [ -z "$GPGHOMEDIR" ]; then return; fi
     if command_available 'gpgconf'; then
-       GNUPGHOME="${GPGHOMEDIR}" gpgconf --kill gpg-agent
+       GNUPGHOME="${GPGHOMEDIR}" gpgconf --kill gpg-agent >/dev/null 2>&1 || true
     fi
     rm -rf "$GPGHOMEDIR"
 }