]> git.saurik.com Git - apt.git/commitdiff
Merge remote-tracking branch 'upstream/debian/jessie' into debian/sid
authorMichael Vogt <mvo@ubuntu.com>
Fri, 22 May 2015 14:17:08 +0000 (16:17 +0200)
committerMichael Vogt <mvo@ubuntu.com>
Fri, 22 May 2015 14:17:08 +0000 (16:17 +0200)
Conflicts:
apt-pkg/deb/dpkgpm.cc

1  2 
apt-pkg/deb/deblistparser.cc
methods/https.cc

index 3941cf2f228f7b21538c66985560fc9236ab5740,213235c2b16b217b1ca31fea7bb23d77fe10ac89..e87e7b5e49daa6dbf4e045d2966855edfd288c64
@@@ -770,7 -770,7 +770,7 @@@ bool debListParser::ParseDepends(pkgCac
         if (NewDepends(Ver,Package,"none",Version,Op,Type) == false)
            return false;
        }
-       else if (MultiArchEnabled == true && found != string::npos &&
+       else if (found != string::npos &&
               strcmp(Package.c_str() + found, ":any") != 0)
        {
         string Arch = Package.substr(found+1, string::npos);
@@@ -817,16 -817,10 +817,16 @@@ bool debListParser::ParseProvides(pkgCa
        while (1)
        {
         Start = ParseDepends(Start,Stop,Package,Version,Op);
 +       const size_t archfound = Package.rfind(':');
         if (Start == 0)
            return _error->Error("Problem parsing Provides line");
         if (Op != pkgCache::Dep::NoOp && Op != pkgCache::Dep::Equals) {
            _error->Warning("Ignoring Provides line with non-equal DepCompareOp for package %s", Package.c_str());
 +       } else if (archfound != string::npos) {
 +          string OtherArch = Package.substr(archfound+1, string::npos);
 +          Package = Package.substr(0, archfound);
 +          if (NewProvides(Ver, Package, OtherArch, Version) == false)
 +             return false;
         } else if ((Ver->MultiArch & pkgCache::Version::Foreign) == pkgCache::Version::Foreign) {
            if (NewProvidesAllArch(Ver, Package, Version) == false)
               return false;
diff --combined methods/https.cc
index 12fc6c70fbcbf78230d8fe00bd830deb02ed24c6,cb11159bc56cb5e7768ef3b41ee4c9b64bcd3280..81060122cd2d486171e4700b27bd9f47b9304e51
@@@ -55,10 -55,10 +55,10 @@@ HttpsMethod::parse_header(void *buffer
     {
        if (me->Server->Result != 416 && me->Server->StartPos != 0)
         ;
 -      else if (me->Server->Result == 416 && me->Server->Size == me->File->FileSize())
 +      else if (me->Server->Result == 416 && me->Server->TotalFileSize == me->File->FileSize())
        {
           me->Server->Result = 200;
 -       me->Server->StartPos = me->Server->Size;
 +       me->Server->StartPos = me->Server->TotalFileSize;
         // the actual size is not important for https as curl will deal with it
         // by itself and e.g. doesn't bother us with transport-encoding…
         me->Server->JunkSize = std::numeric_limits<unsigned long long>::max();
@@@ -68,6 -68,8 +68,8 @@@
  
        me->File->Truncate(me->Server->StartPos);
        me->File->Seek(me->Server->StartPos);
+       me->Res.Size = me->Server->Size;
     }
     else if (me->Server->HeaderLine(line) == false)
        return 0;
@@@ -97,17 -99,6 +99,6 @@@ HttpsMethod::write_data(void *buffer, s
     return buffer_size;
  }
  
- int
- HttpsMethod::progress_callback(void *clientp, double dltotal, double /*dlnow*/,
-                              double /*ultotal*/, double /*ulnow*/)
- {
-    HttpsMethod *me = (HttpsMethod *)clientp;
-    if(dltotal > 0 && me->Res.Size == 0) {
-       me->Res.Size = (unsigned long long)dltotal;
-    }
-    return 0;
- }
  // HttpsServerState::HttpsServerState - Constructor                   /*{{{*/
  HttpsServerState::HttpsServerState(URI Srv,HttpsMethod * /*Owner*/) : ServerState(Srv, NULL)
  {
@@@ -201,10 -192,8 +192,8 @@@ bool HttpsMethod::Fetch(FetchItem *Itm
     curl_easy_setopt(curl, CURLOPT_WRITEHEADER, this);
     curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data);
     curl_easy_setopt(curl, CURLOPT_WRITEDATA, this);
-    curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, progress_callback);
-    curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, this);
     // options
-    curl_easy_setopt(curl, CURLOPT_NOPROGRESS, false);
+    curl_easy_setopt(curl, CURLOPT_NOPROGRESS, true);
     curl_easy_setopt(curl, CURLOPT_FILETIME, true);
     // only allow curl to handle https, not the other stuff it supports
     curl_easy_setopt(curl, CURLOPT_PROTOCOLS, CURLPROTO_HTTPS);
     // go for it - if the file exists, append on it
     File = new FileFd(Itm->DestFile, FileFd::WriteAny);
     Server = new HttpsServerState(Itm->Uri, this);
+    Res = FetchResult();
  
     // keep apt updated
     Res.Filename = Itm->DestFile;