]> git.saurik.com Git - apt.git/commitdiff
Merge branch 'debian/sid' into debian/experimental
authorMichael Vogt <mvo@ubuntu.com>
Mon, 29 Sep 2014 06:33:33 +0000 (08:33 +0200)
committerMichael Vogt <mvo@ubuntu.com>
Mon, 29 Sep 2014 06:33:33 +0000 (08:33 +0200)
Conflicts:
apt-pkg/acquire-item.cc

1  2 
apt-pkg/acquire-item.cc
apt-pkg/deb/debindexfile.cc
cmdline/apt-get.cc
methods/copy.cc
test/integration/framework
test/integration/test-bug-595691-empty-and-broken-archive-files

index d1c1f8c5a3f8e0a05ca051342ed91a13676fbd3c,2401364a95b92dc56d428400f29ba23c65e3d5f1..f46c8a6e46f9f2c8534d32f7269a52a5fe39c218
@@@ -1012,28 -967,11 +1012,29 @@@ void pkgAcqIndex::Init(string const &UR
     DestFile += URItoFileName(URI);
  
     std::string const comprExt = CompressionExtension.substr(0, CompressionExtension.find(' '));
 +   std::string MetaKey;
     if (comprExt == "uncompressed")
 +   {
        Desc.URI = URI;
 -   else {
 +      if(Target)
 +         MetaKey = string(Target->MetaKey);
 +   }
 +   else
 +   {
        Desc.URI = URI + '.' + comprExt;
+       DestFile = DestFile + '.' + comprExt;
 +      if(Target)
 +         MetaKey = string(Target->MetaKey) + '.' + comprExt;
 +   }
 +
 +   // load the filesize
 +   if(MetaIndexParser)
 +   {
 +      indexRecords::checkSum *Record = MetaIndexParser->Lookup(MetaKey);
 +      if(Record)
 +         FileSize = Record->Size;
 +      
 +      InitByHashIfNeeded(MetaKey);
     }
  
     Desc.Description = URIDesc;
@@@ -1078,15 -984,19 +1079,16 @@@ void pkgAcqIndex::InitByHashIfNeeded(co
  // AcqIndex::Custom600Headers - Insert custom request headers         /*{{{*/
  // ---------------------------------------------------------------------
  /* The only header we use is the last-modified header. */
 -string pkgAcqIndex::Custom600Headers()
 +string pkgAcqIndex::Custom600Headers() const
  {
+    std::string const compExt = CompressionExtension.substr(0, CompressionExtension.find(' '));
     string Final = _config->FindDir("Dir::State::lists");
     Final += URItoFileName(RealURI);
     if (_config->FindB("Acquire::GzipIndexes",false))
-       Final += ".gz";
+       Final += compExt;
     
     string msg = "\nIndex-File: true";
 -   // FIXME: this really should use "IndexTarget::IsOptional()" but that
 -   //        seems to be difficult without breaking ABI
 -   if (ShortDesc().find("Translation") != 0)
 -      msg += "\nFail-Ignore: true";
 +
     struct stat Buf;
     if (stat(Final.c_str(),&Buf) == 0)
        msg += "\nLast-Modified: " + TimeRFC1123(Buf.st_mtime);
@@@ -1313,13 -1215,13 +1322,13 @@@ pkgAcqIndexTrans::pkgAcqIndexTrans(pkgA
                                                                        /*}}}*/
  // AcqIndexTrans::Custom600Headers - Insert custom request headers    /*{{{*/
  // ---------------------------------------------------------------------
 -string pkgAcqIndexTrans::Custom600Headers()
 +string pkgAcqIndexTrans::Custom600Headers() const
  {
+    std::string const compExt = CompressionExtension.substr(0, CompressionExtension.find(' '));
     string Final = _config->FindDir("Dir::State::lists");
     Final += URItoFileName(RealURI);
     if (_config->FindB("Acquire::GzipIndexes",false))
-       Final += ".gz";
+       Final += compExt;
  
     struct stat Buf;
     if (stat(Final.c_str(),&Buf) != 0)
Simple merge
Simple merge
diff --cc methods/copy.cc
Simple merge
Simple merge