diff options
author | Julian Andres Klode <julian.klode@canonical.com> | 2022-10-31 11:17:04 +0100 |
---|---|---|
committer | Julian Andres Klode <julian.klode@canonical.com> | 2022-10-31 11:18:13 +0100 |
commit | c2cb1e42189c5fe3481386cb83a6b03bfe583d1f (patch) | |
tree | 834902f405dd06669a285ec666c93b0d46d5a3f9 | |
parent | dccfe14ffb9713fbf320691c0f6cd679f2acf4fc (diff) |
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
-rw-r--r-- | methods/gpgv.cc | 2 | ||||
-rwxr-xr-x | test/integration/test-signed-by-option | 5 |
2 files changed, 6 insertions, 1 deletions
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}" |