summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2020-05-06 12:52:57 +0200
committerJulian Andres Klode <julian.klode@canonical.com>2020-05-06 12:52:57 +0200
commitf9f0ae2bbb2d0bfeccddecbf8b9ec07ccd54cd9a (patch)
tree399b6e4c323eec7de45a62034502181e73e77bf5
parentee284d5917d09649b68ff1632d44e892f290c52f (diff)
apt-key: Allow depending on gpg instead of gnupg
Maintainer scripts that need to use apt-key del might as well depend on gpg, they don't need the full gnupg suite.
-rw-r--r--cmdline/apt-key.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmdline/apt-key.in b/cmdline/apt-key.in
index c61b8b417..baf3df5c3 100644
--- a/cmdline/apt-key.in
+++ b/cmdline/apt-key.in
@@ -671,10 +671,10 @@ prepare_gpg_home() {
# well as the script hopefully uses apt-key optionally then like e.g.
# debian-archive-keyring for (upgrade) cleanup did
if [ -n "$DPKG_MAINTSCRIPT_PACKAGE" ] && [ -z "$APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE" ]; then
- if ! dpkg-query --show --showformat '${Pre-Depends}${Depends}${Recommends}\n' "$DPKG_MAINTSCRIPT_PACKAGE" 2>/dev/null | grep -q gnupg; then
+ if ! dpkg-query --show --showformat '${Pre-Depends}${Depends}${Recommends}\n' "$DPKG_MAINTSCRIPT_PACKAGE" 2>/dev/null | grep -E -q 'gpg|gnupg'; then
cat >&2 <<EOF
Warning: The $DPKG_MAINTSCRIPT_NAME maintainerscript of the package $DPKG_MAINTSCRIPT_PACKAGE
-Warning: seems to use apt-key (provided by apt) without depending on gnupg or gnupg2.
+Warning: seems to use apt-key (provided by apt) without depending on gpg, gnupg, or gnupg2.
Warning: This will BREAK in the future and should be fixed by the package maintainer(s).
Note: Check first if apt-key functionality is needed at all - it probably isn't!
EOF