summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
authorCarsten Hey <carsten@debian.org>2016-05-01 17:06:29 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2016-05-01 17:17:18 +0200
commit2e49f51915d07a6ad85c7ee4380a1e51afaa3a17 (patch)
treebf62077d92f82e7c3f4a8ae599f7b72dea6be9f3 /cmdline
parent5f17b19f8f99eb6f80a10846d5891f53c16178dc (diff)
apt-key: add \n to dpkg-query --show --showformat
Guarding against 'broken' greps not dealing with non-text inputs "just in case" by making the input text with a proper newline. [commit message by David Kalnischkies] Reported-On: IRC Git-Dch: Ignore
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/apt-key.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmdline/apt-key.in b/cmdline/apt-key.in
index 3f9f01627..b309142cf 100644
--- a/cmdline/apt-key.in
+++ b/cmdline/apt-key.in
@@ -498,7 +498,7 @@ 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" ]; then
- if ! dpkg-query --show --showformat '${Pre-Depends}${Depends}${Recommends}' "$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 -q 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.