From: Michael Vogt Date: Fri, 22 May 2015 14:17:08 +0000 (+0200) Subject: Merge remote-tracking branch 'upstream/debian/jessie' into debian/sid X-Git-Tag: 1.0.9.10~3 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/0f3150e7040f45565b459a1390606bc2f714f6a8?hp=-c Merge remote-tracking branch 'upstream/debian/jessie' into debian/sid Conflicts: apt-pkg/deb/dpkgpm.cc --- 0f3150e7040f45565b459a1390606bc2f714f6a8 diff --combined apt-pkg/deb/deblistparser.cc index 3941cf2f2,213235c2b..e87e7b5e4 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@@ -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 12fc6c70f,cb11159bc..81060122c --- a/methods/https.cc +++ b/methods/https.cc @@@ -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::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); @@@ -357,6 -346,7 +346,7 @@@ // 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;