From 012932793ba0ea9398a9acd80593bed8e77cfbfc Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 1 Aug 2017 15:22:09 +0200 Subject: ignore unsupported key formats in apt-key gpg2 generates keyboxes by default and users end up putting either those or armored files into the trusted.gpg.d directory which apt tools neither expect nor can really work with without fortifying backward compatibility (at least under the ".gpg" extension). A (short) discussion about how to deal with keyboxes happened in https://lists.debian.org/deity/2017/07/msg00083.html As the last message in that thread is this changeset lets go ahead with it and see how it turns out. The idea is here simply that we check the first octal of a gpg file to have one of three accepted values. Testing on my machines has always produced just one of these, but running into those values on invalid files is reasonabily unlikely to not worry too much. Closes: #876508 --- test/integration/framework | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'test/integration/framework') diff --git a/test/integration/framework b/test/integration/framework index 391cc53a1..701aa60b0 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -1497,6 +1497,10 @@ testempty() { aptautotest 'testempty' "$@" msggroup } +testwarningempty() { + testwarning "$@" + testfailure grep -v '^W:' "${ROOTDIR}/tmp/testwarning.output" +} testnotempty() { msggroup 'testnotempty' msgtest "Test for some output of" "$*" @@ -1967,7 +1971,7 @@ mapkeynametokeyid() { } testaptkeys() { local OUTPUT="${TMPWORKINGDIRECTORY}/rootdir/tmp/aptkeylist.output" - if ! aptkey list --with-colon | grep '^pub' | cut -d':' -f 5 > "$OUTPUT"; then + if ! aptkey list --with-colon 2>/dev/null | grep '^pub' | cut -d':' -f 5 > "$OUTPUT"; then echo -n > "$OUTPUT" fi testfileequal "$OUTPUT" "$(mapkeynametokeyid "$@")" -- cgit v1.2.3