summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/acquire-item.cc5
-rwxr-xr-xtest/integration/test-apt-update-repeated-ims-hit2
2 files changed, 7 insertions, 0 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index 062b39cad..92931d1d7 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -2224,6 +2224,11 @@ void pkgAcqMetaSig::Failed(string const &Message,pkgAcquire::MethodConfig const
return;
// ensures that a Release.gpg file in the lists/ is removed by the transaction
+ if (not MetaIndexFileSignature.empty())
+ {
+ DestFile = MetaIndexFileSignature;
+ MetaIndexFileSignature.clear();
+ }
TransactionManager->TransactionStageRemoval(this, DestFile);
// only allow going further if the user explicitly wants it
diff --git a/test/integration/test-apt-update-repeated-ims-hit b/test/integration/test-apt-update-repeated-ims-hit
index 8630ff5ee..74d46b31b 100755
--- a/test/integration/test-apt-update-repeated-ims-hit
+++ b/test/integration/test-apt-update-repeated-ims-hit
@@ -53,11 +53,13 @@ testfailure grep 'aptarchive_Release.gpg$' lists.before
for i in $(seq 1 3); do
msgmsg 'Running update again does not change result' "$i"
testwarningmsg "$GPGERROR" apt update
+ testfileequal lists.before "$(listcurrentlistsdirectory)"
done
find rootdir/var/lib/apt/lists -name '*Release*' -delete
msgmsg 'Running update with a repository gaining hashsums'
testwarningmsg "$GPGERROR" apt update
+testfileequal lists.before "$(listcurrentlistsdirectory)"
changetowebserver
find aptarchive -name '*Release*' -delete