summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2016-12-31 00:44:08 -0800
committerSam Bingner <sam@bingner.com>2020-07-17 00:22:23 -1000
commit58c5a5404b1e2bc244306f1f3afc18f474c164f6 (patch)
treec6ae7bc0133497a2108366e94c3dc21ec0d0c857 /apt-pkg
parent5bec9a8403f570c7ad6ecdfbad0618c4be51cac8 (diff)
On IMS-Hit, you can't assume local compression :/.
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/acquire-item.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index e6488885f..1f901e3b7 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -3275,6 +3275,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
@@ -3283,7 +3284,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;