Skip to content

Commit

Permalink
Actually delete temporary apt-key.*.asc helper files
Browse files Browse the repository at this point in the history
During development there was an if (0) there for debugging purposes
that unfortunately stayed in and caused files to accumulate.

LP: #1995247
  • Loading branch information
julian-klode committed Oct 31, 2022
1 parent dccfe14 commit c2cb1e4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion methods/gpgv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down
5 changes: 5 additions & 0 deletions test/integration/test-signed-by-option
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}"

0 comments on commit c2cb1e4

Please sign in to comment.