From 83ff257477c9e5d4ef1b74cb42780f22660af109 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 29 Apr 2022 12:46:55 +0200 Subject: Do not change UsedMirror on local copy of InRelease While we pick most files from the file:/ mirror directly, we explicitly bring in the InRelease file with a copy one if-clause later, which causes this code to be run again and ends up considering the copy:/ the mirror the file was picked up from, which works, but isn't what we had signed up for. --- apt-pkg/acquire-item.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 7e1c5dad6..c845c9153 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -1424,7 +1424,7 @@ bool pkgAcqMetaBase::CheckDownloadDone(pkgAcqTransactionItem * const I, const st // verified yet) // Save the final base URI we got this Release file from - if (I->UsedMirror.empty() == false && _config->FindB("Acquire::SameMirrorForAllIndexes", true)) + if (not I->Local && not I->UsedMirror.empty() && _config->FindB("Acquire::SameMirrorForAllIndexes", true)) { auto InReleasePath = Target.Option(IndexTarget::INRELEASE_PATH); if (InReleasePath.empty()) -- cgit v1.2.3-70-g09d2