From c2cb1e42189c5fe3481386cb83a6b03bfe583d1f Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Mon, 31 Oct 2022 11:17:04 +0100 Subject: Actually delete temporary apt-key.*.asc helper files During development there was an if (0) there for debugging purposes that unfortunately stayed in and caused files to accumulate. LP: #1995247 --- methods/gpgv.cc | 2 +- test/integration/test-signed-by-option | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/methods/gpgv.cc b/methods/gpgv.cc index b8d348484..267b43e08 100644 --- a/methods/gpgv.cc +++ b/methods/gpgv.cc @@ -482,7 +482,7 @@ bool GPGVMethod::URIAcquire(std::string const &Message, FetchItem *Itm) struct TemporaryFile { std::string name = ""; - ~TemporaryFile() { if (0) RemoveFile("~TemporaryFile", name); } + ~TemporaryFile() { RemoveFile("~TemporaryFile", name); } } tmpKey; std::string SignedBy = DeQuoteString(LookupTag(Message, "Signed-By")); diff --git a/test/integration/test-signed-by-option b/test/integration/test-signed-by-option index 986088bce..58e4c4b19 100755 --- a/test/integration/test-signed-by-option +++ b/test/integration/test-signed-by-option @@ -7,6 +7,9 @@ TESTDIR="$(readlink -f "$(dirname "$0")")" setupenvironment configarchitecture 'amd64' +export TMPDIR="${TMPWORKINGDIRECTORY}/tmp" +mkdir "${TMPDIR}" + msgtest 'Check that a repository with' 'signed-by and two components works' echo 'deb [signed-by=CDE5618B8805FD6E202CE9C2D73C39E56580B386] https://people.debian.org/~jak/debian/ stable main contrib # Äffchen' > rootdir/etc/apt/sources.list testsuccess --nomsg aptcache policy @@ -66,3 +69,5 @@ testfailure apt update -o Debug::Acquire::gpgv=1 testsuccess grep "NO_PUBKEY 5A90D141DBAC8DAE" rootdir/tmp/testfailure.output sed -i s/^xSigned-By/Signed-By/ rootdir/etc/apt/sources.list.d/deb822.sources testsuccess apt update -o Debug::Acquire::gpgv=1 +# make sure we did not leave leftover files (LP: #1995247) +testsuccessequal "" ls "${TMPDIR}" -- cgit v1.2.3-18-g5258