From 3650e87b0cee98547024c2cb613c95f5e736971d Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sun, 25 Dec 2016 22:03:03 -0800 Subject: This is 2016 and APT already requires use of mmap. --- apt-pkg/acquire-item.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/acquire-item.cc') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 6a809a1c6..7f5db24d3 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -3603,7 +3603,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"); -- cgit v1.2.3 From 1242b3bdaf3d3682a945f10f0e537bdb3b0599d5 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Mon, 26 Dec 2016 03:36:30 -0800 Subject: Wreck validation until we can assess ecosystem :/. --- apt-pkg/acquire-item.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/acquire-item.cc') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 7f5db24d3..663452b9f 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; } -- cgit v1.2.3 From c65bdf3bf1390cee509fd850e006c0faebf252ab Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sat, 31 Dec 2016 00:44:08 -0800 Subject: On IMS-Hit, you can't assume local compression :/. --- apt-pkg/acquire-item.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'apt-pkg/acquire-item.cc') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 663452b9f..12d035207 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -3070,6 +3070,7 @@ 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); 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 +3079,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; -- cgit v1.2.3 From 98639cb8c8b5ee0bec3449a2c3e08bc0177afc12 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Mon, 30 Jan 2017 11:11:45 -0800 Subject: Symlinking final file failed is a common issue :/. --- apt-pkg/acquire-item.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'apt-pkg/acquire-item.cc') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 12d035207..072a4c6e8 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -3071,6 +3071,7 @@ 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 -- cgit v1.2.3 From f6877b4806585106a204cddcbc4640fc1d4a93ed Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Tue, 31 Jan 2017 05:02:51 -0800 Subject: Repeat after me: IMS-Hit is really "I am shit" :/. --- apt-pkg/acquire-item.cc | 1 - 1 file changed, 1 deletion(-) (limited to 'apt-pkg/acquire-item.cc') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 072a4c6e8..f27ef28d3 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -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(); } -- cgit v1.2.3 From fb97f9603ada7961f30b123962a11981aee475a3 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Wed, 15 Feb 2017 15:17:52 -0800 Subject: Don't download "optional" files not in Release :/. --- apt-pkg/acquire-item.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'apt-pkg/acquire-item.cc') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index f27ef28d3..82bf8a1eb 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -1411,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; @@ -1535,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); } -- cgit v1.2.3