From 2e49f51915d07a6ad85c7ee4380a1e51afaa3a17 Mon Sep 17 00:00:00 2001 From: Carsten Hey Date: Sun, 1 May 2016 17:06:29 +0200 Subject: 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 --- cmdline/apt-key.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmdline/apt-key.in') 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 <