diff options
author | Sam Bingner <sam@bingner.com> | 2018-12-26 13:07:23 -1000 |
---|---|---|
committer | Sam Bingner <sam@bingner.com> | 2018-12-26 14:51:59 -1000 |
commit | 59c3e0b998fd69532159d8dc416109cf50651482 (patch) | |
tree | 2e58bef1273e4d3542c168980e4a2d793e170045 /apt-pkg/acquire-item.cc | |
parent | ac0d26d4e39da16bdbf575637fd3d4b24a7fb4b8 (diff) | |
parent | 2aa218273eb6009880e987f90d3e24b8efb04642 (diff) |
Merge nitotv apt fixes into 1.4.81.4.8+nitotv
Diffstat (limited to 'apt-pkg/acquire-item.cc')
-rw-r--r-- | apt-pkg/acquire-item.cc | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 3c85f8adf..231c5eed9 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -266,7 +266,7 @@ static bool APT_NONNULL(3, 4, 5) AllowInsecureRepositories(InsecureType const ms if (TargetIsAllowedToBe(TransactionManager->Target, msg) == true) { - MessageInsecureRepository(false, msgstr, repo); + //MessageInsecureRepository(false, msgstr, repo); return true; } @@ -1294,7 +1294,6 @@ bool pkgAcqMetaBase::CheckDownloadDone(pkgAcqTransactionItem * const I, const st { // for simplicity, the transaction manager is always InRelease // even if it doesn't exist. - TransactionManager->IMSHit = true; I->PartialFile = I->DestFile = I->GetFinalFilename(); } @@ -1412,7 +1411,7 @@ void pkgAcqMetaClearSig::QueueIndexes(bool const verify) /*{{{*/ if (TransactionManager->MetaIndexParser->Exists(Target.MetaKey) == false) { // optional targets that we do not have in the Release file are skipped - if (hasHashes == true && Target.IsOptional) + if (Target.IsOptional) { new CleanupItem(Owner, TransactionManager, Target); continue; @@ -1536,6 +1535,13 @@ void pkgAcqMetaClearSig::QueueIndexes(bool const verify) /*{{{*/ } else { + // if the source wanted these files they should have given us a release file :/ + if (Target.IsOptional) + { + new CleanupItem(Owner, TransactionManager, Target); + continue; + } + // if we have no file to patch, no point in trying trypdiff &= (GetExistingFilename(GetFinalFileNameFromURI(Target.URI)).empty() == false); } @@ -3070,6 +3076,8 @@ void pkgAcqIndex::StageDownloadDone(string const &Message) { // copy FinalFile into partial/ so that we check the hash again string const FinalFile = GetExistingFilename(GetFinalFileNameFromURI(Target.URI)); + DestFile = GetKeepCompressedFileName(GetPartialFileNameFromURI(Target.URI), Target); + unlink(DestFile.c_str()); if (symlink(FinalFile.c_str(), DestFile.c_str()) != 0) _error->WarningE("pkgAcqIndex::StageDownloadDone", "Symlinking final file %s back to %s failed", FinalFile.c_str(), DestFile.c_str()); else @@ -3078,7 +3086,10 @@ void pkgAcqIndex::StageDownloadDone(string const &Message) Filename = DestFile; } Stage = STAGE_DECOMPRESS_AND_VERIFY; - Desc.URI = "store:" + Filename; + if (Filename != DestFile && flExtension(Filename) == flExtension(DestFile)) + Desc.URI = "copy:" + Filename; + else + Desc.URI = "store:" + Filename; QueueURI(Desc); SetActiveSubprocess(::URI(Desc.URI).Access); return; @@ -3603,7 +3614,7 @@ std::string pkgAcqChangelog::URITemplate(pkgCache::RlsFileIterator const &Rls) should be so this could produce request order-dependent anomalies */ if (OpenMaybeClearSignedFile(Rls.FileName(), rf) == true) { - pkgTagFile TagFile(&rf, rf.Size()); + pkgTagFile TagFile(&rf); pkgTagSection Section; if (TagFile.Step(Section) == true) server = Section.FindS("Changelogs"); |