summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2023-03-06 09:21:27 +0000
committerJulian Andres Klode <jak@debian.org>2023-03-06 09:21:27 +0000
commita4aa4c61498fd542ff65b340157db3a4a0a87f60 (patch)
tree397fe4f1153fb9493bf97e95d00bea9ac4c06b7e /apt-pkg
parent6ba6b29e37a7e7b867a88f1d74e7dcfd7f83c30e (diff)
parent937221fde2a5ca989a0b80728cd3ba3639f9f20e (diff)
Merge branch 'fix/unconditional-trusted' into 'main'
Do not store trusted=yes Release file unconditionally See merge request apt-team/apt!289
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/acquire-item.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index 2014a50d5..7df6483ba 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -2030,7 +2030,6 @@ void pkgAcqMetaClearSig::Failed(string const &Message,pkgAcquire::MethodConfig c
string const PartialRelease = GetPartialFileNameFromURI(DetachedDataTarget.URI);
string const FinalInRelease = GetFinalFilename();
Rename(DestFile, PartialRelease);
- TransactionManager->TransactionStageCopy(this, PartialRelease, FinalRelease);
LoadLastMetaIndexParser(TransactionManager, FinalRelease, FinalInRelease);
// we parse the indexes here because at this point the user wanted
@@ -2038,7 +2037,10 @@ void pkgAcqMetaClearSig::Failed(string const &Message,pkgAcquire::MethodConfig c
if (TransactionManager->MetaIndexParser->Load(PartialRelease, &ErrorText) == false || VerifyVendor(Message) == false)
/* expired Release files are still a problem you need extra force for */;
else
+ {
+ TransactionManager->TransactionStageCopy(this, PartialRelease, FinalRelease);
TransactionManager->QueueIndexes(true);
+ }
}
}
}
@@ -2247,9 +2249,10 @@ void pkgAcqMetaSig::Failed(string const &Message,pkgAcquire::MethodConfig const
if (MetaIndex->VerifyVendor(Message) == false)
/* expired Release files are still a problem you need extra force for */;
else
+ {
+ TransactionManager->TransactionStageCopy(MetaIndex, MetaIndex->DestFile, FinalRelease);
TransactionManager->QueueIndexes(GoodLoad);
-
- TransactionManager->TransactionStageCopy(MetaIndex, MetaIndex->DestFile, FinalRelease);
+ }
}
else if (TransactionManager->IMSHit == false)
Rename(MetaIndex->DestFile, MetaIndex->DestFile + ".FAILED");