]> git.saurik.com Git - apt.git/commitdiff
On IMS-Hit, you can't assume local compression :/. cydia_1.1.28%b5
authorJay Freeman (saurik) <saurik@saurik.com>
Sat, 31 Dec 2016 08:44:08 +0000 (00:44 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Sat, 31 Dec 2016 08:44:08 +0000 (00:44 -0800)
apt-pkg/acquire-item.cc

index 663452b9f1c92451c72ac5008f46e4c0c83411f4..12d0352075fdb5e6154b39ad09db14fbae7716ce 100644 (file)
@@ -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));
    {
       // 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
       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;
         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;
       QueueURI(Desc);
       SetActiveSubprocess(::URI(Desc.URI).Access);
       return;