From: Carsten Hey Date: Sun, 1 May 2016 15:06:29 +0000 (+0200) Subject: apt-key: add \n to dpkg-query --show --showformat X-Git-Tag: 1.3_exp1~21 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/2e49f51915d07a6ad85c7ee4380a1e51afaa3a17 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 --- 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 <