From: Michael Vogt Date: Tue, 9 Aug 2011 12:38:01 +0000 (+0200) Subject: merged from the debian-experimental2 branch X-Git-Tag: 0.9.0~59^2~3 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/216d0bd8869c4f52ead5256064512ac97e9fc824?ds=inline;hp=-c merged from the debian-experimental2 branch --- 216d0bd8869c4f52ead5256064512ac97e9fc824 diff --combined apt-pkg/acquire-item.cc index d4b451d5b,d8fa1f828..3112c568d --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@@ -94,7 -94,7 +94,7 @@@ void pkgAcquire::Item::Failed(string Me // --------------------------------------------------------------------- /* Stash status and the file size. Note that setting Complete means sub-phases of the acquire process such as decompresion are operating */ - void pkgAcquire::Item::Start(string /*Message*/,unsigned long Size) + void pkgAcquire::Item::Start(string /*Message*/,unsigned long long Size) { Status = StatFetching; if (FileSize == 0 && Complete == false) @@@ -104,7 -104,7 +104,7 @@@ // Acquire::Item::Done - Item downloaded OK /*{{{*/ // --------------------------------------------------------------------- /* */ - void pkgAcquire::Item::Done(string Message,unsigned long Size,string Hash, + void pkgAcquire::Item::Done(string Message,unsigned long long Size,string Hash, pkgAcquire::MethodConfig *Cnf) { // We just downloaded something.. @@@ -245,7 -245,7 +245,7 @@@ void pkgAcqSubIndex::Failed(string Mess } } /*}}}*/ - void pkgAcqSubIndex::Done(string Message,unsigned long Size,string Md5Hash, /*{{{*/ + void pkgAcqSubIndex::Done(string Message,unsigned long long Size,string Md5Hash, /*{{{*/ pkgAcquire::MethodConfig *Cnf) { if(Debug) @@@ -544,7 -544,7 +544,7 @@@ void pkgAcqDiffIndex::Failed(string Mes Dequeue(); } /*}}}*/ - void pkgAcqDiffIndex::Done(string Message,unsigned long Size,string Md5Hash, /*{{{*/ + void pkgAcqDiffIndex::Done(string Message,unsigned long long Size,string Md5Hash, /*{{{*/ pkgAcquire::MethodConfig *Cnf) { if(Debug) @@@ -710,7 -710,7 +710,7 @@@ bool pkgAcqIndexDiffs::QueueNextDiff( return true; } /*}}}*/ - void pkgAcqIndexDiffs::Done(string Message,unsigned long Size,string Md5Hash, /*{{{*/ + void pkgAcqIndexDiffs::Done(string Message,unsigned long long Size,string Md5Hash, /*{{{*/ pkgAcquire::MethodConfig *Cnf) { if(Debug) @@@ -808,6 -808,13 +808,13 @@@ pkgAcqIndex::pkgAcqIndex(pkgAcquire *Ow if (CompressionExtension.empty() == false) CompressionExtension.erase(CompressionExtension.end()-1); + // only verify non-optional targets, see acquire-item.h for a FIXME + // to make this more flexible + if (Target->IsOptional()) + Verify = false; + else + Verify = true; + Init(Target->URI, Target->Description, Target->ShortDesc); } /*}}}*/ @@@ -881,7 -888,7 +888,7 @@@ void pkgAcqIndex::Failed(string Message to the uncompressed version of the file. If this is so the file is copied into the partial directory. In all other cases the file is decompressed with a gzip uri. */ - void pkgAcqIndex::Done(string Message,unsigned long Size,string Hash, + void pkgAcqIndex::Done(string Message,unsigned long long Size,string Hash, pkgAcquire::MethodConfig *Cfg) { Item::Done(Message,Size,Hash,Cfg); @@@ -905,6 -912,7 +912,7 @@@ /* Verify the index file for correctness (all indexes must * have a Package field) (LP: #346386) (Closes: #627642) */ + if (Verify == true) { FileFd fd(DestFile, FileFd::ReadOnly); pkgTagSection sec; @@@ -1123,7 -1131,7 +1131,7 @@@ string pkgAcqMetaSig::Custom600Headers( return "\nIndex-File: true\nLast-Modified: " + TimeRFC1123(Buf.st_mtime); } - void pkgAcqMetaSig::Done(string Message,unsigned long Size,string MD5, + void pkgAcqMetaSig::Done(string Message,unsigned long long Size,string MD5, pkgAcquire::MethodConfig *Cfg) { Item::Done(Message,Size,MD5,Cfg); @@@ -1232,7 -1240,7 +1240,7 @@@ string pkgAcqMetaIndex::Custom600Header return "\nIndex-File: true\nLast-Modified: " + TimeRFC1123(Buf.st_mtime); } /*}}}*/ - void pkgAcqMetaIndex::Done(string Message,unsigned long Size,string Hash, /*{{{*/ + void pkgAcqMetaIndex::Done(string Message,unsigned long long Size,string Hash, /*{{{*/ pkgAcquire::MethodConfig *Cfg) { Item::Done(Message,Size,Hash,Cfg); @@@ -1258,9 -1266,8 +1266,9 @@@ if (SigFile == "") { // There was no signature file, so we are finished. Download - // the indexes without verification. - QueueIndexes(false); + // the indexes and do only hashsum verification + MetaIndexParser->Load(DestFile); + QueueIndexes(true); } else { @@@ -1397,7 -1404,6 +1405,7 @@@ void pkgAcqMetaIndex::QueueIndexes(boo { std::cerr << "Queueing: " << (*Target)->URI << std::endl; std::cerr << "Expected Hash: " << ExpectedIndexHash.toStr() << std::endl; + std::cerr << "For: " << Record->MetaKeyFilename << std::endl; } if (ExpectedIndexHash.empty() == true && (*Target)->IsOptional() == false) { @@@ -1734,6 -1740,8 +1742,8 @@@ bool pkgAcqArchive::QueueNext( string PkgFile = Parse.FileName(); if (ForceHash.empty() == false) { + if(stringcasecmp(ForceHash, "sha512") == 0) + ExpectedHash = HashString("SHA512", Parse.SHA512Hash()); if(stringcasecmp(ForceHash, "sha256") == 0) ExpectedHash = HashString("SHA256", Parse.SHA256Hash()); else if (stringcasecmp(ForceHash, "sha1") == 0) @@@ -1744,7 -1752,9 +1754,9 @@@ else { string Hash; - if ((Hash = Parse.SHA256Hash()).empty() == false) + if ((Hash = Parse.SHA512Hash()).empty() == false) + ExpectedHash = HashString("SHA512", Hash); + else if ((Hash = Parse.SHA256Hash()).empty() == false) ExpectedHash = HashString("SHA256", Hash); else if ((Hash = Parse.SHA1Hash()).empty() == false) ExpectedHash = HashString("SHA1", Hash); @@@ -1768,7 -1778,7 +1780,7 @@@ if (stat(FinalFile.c_str(),&Buf) == 0) { // Make sure the size matches - if ((unsigned)Buf.st_size == Version->Size) + if ((unsigned long long)Buf.st_size == Version->Size) { Complete = true; Local = true; @@@ -1787,7 -1797,7 +1799,7 @@@ if (stat(FinalFile.c_str(),&Buf) == 0) { // Make sure the size matches - if ((unsigned)Buf.st_size == Version->Size) + if ((unsigned long long)Buf.st_size == Version->Size) { Complete = true; Local = true; @@@ -1807,7 -1817,7 +1819,7 @@@ if (stat(DestFile.c_str(),&Buf) == 0) { // Hmm, the partial file is too big, erase it - if ((unsigned)Buf.st_size > Version->Size) + if ((unsigned long long)Buf.st_size > Version->Size) unlink(DestFile.c_str()); else PartialSize = Buf.st_size; @@@ -1830,7 -1840,7 +1842,7 @@@ // AcqArchive::Done - Finished fetching /*{{{*/ // --------------------------------------------------------------------- /* */ - void pkgAcqArchive::Done(string Message,unsigned long Size,string CalcHash, + void pkgAcqArchive::Done(string Message,unsigned long long Size,string CalcHash, pkgAcquire::MethodConfig *Cfg) { Item::Done(Message,Size,CalcHash,Cfg); @@@ -1941,7 -1951,7 +1953,7 @@@ void pkgAcqArchive::Finished( // --------------------------------------------------------------------- /* The file is added to the queue */ pkgAcqFile::pkgAcqFile(pkgAcquire *Owner,string URI,string Hash, - unsigned long Size,string Dsc,string ShortDesc, + unsigned long long Size,string Dsc,string ShortDesc, const string &DestDir, const string &DestFilename, bool IsIndexFile) : Item(Owner), ExpectedHash(Hash), IsIndexFile(IsIndexFile) @@@ -1969,7 -1979,7 +1981,7 @@@ if (stat(DestFile.c_str(),&Buf) == 0) { // Hmm, the partial file is too big, erase it - if ((unsigned)Buf.st_size > Size) + if ((unsigned long long)Buf.st_size > Size) unlink(DestFile.c_str()); else PartialSize = Buf.st_size; @@@ -1981,7 -1991,7 +1993,7 @@@ // AcqFile::Done - Item downloaded OK /*{{{*/ // --------------------------------------------------------------------- /* */ - void pkgAcqFile::Done(string Message,unsigned long Size,string CalcHash, + void pkgAcqFile::Done(string Message,unsigned long long Size,string CalcHash, pkgAcquire::MethodConfig *Cnf) { Item::Done(Message,Size,CalcHash,Cnf); @@@ -2069,13 -2079,3 +2081,3 @@@ string pkgAcqFile::Custom600Headers( return ""; } /*}}}*/ - bool IndexTarget::IsOptional() const { - if (strncmp(ShortDesc.c_str(), "Translation", 11) != 0) - return false; - return true; - } - bool IndexTarget::IsSubIndex() const { - if (ShortDesc != "TranslationIndex") - return false; - return true; - } diff --combined apt-pkg/pkgcachegen.cc index 7539e1b94,3c21b2442..49a7f7adc --- a/apt-pkg/pkgcachegen.cc +++ b/apt-pkg/pkgcachegen.cc @@@ -98,6 -98,7 +98,7 @@@ pkgCacheGenerator::~pkgCacheGenerator( return; Cache.HeaderP->Dirty = false; + Cache.HeaderP->CacheFileSize = Map.Size(); Map.Sync(0,sizeof(pkgCache::Header)); } /*}}}*/ @@@ -935,7 -936,7 +936,7 @@@ static bool CheckValidity(const string return false; } - if (List.GetLastModifiedTime() < GetModificationTime(CacheFile)) + if (List.GetLastModifiedTime() > GetModificationTime(CacheFile)) { if (Debug == true) std::clog << "sources.list is newer than the cache" << std::endl; diff --combined debian/changelog index 489960912,c4197721f..8719776e0 --- a/debian/changelog +++ b/debian/changelog @@@ -1,25 -1,114 +1,136 @@@ + apt (0.8.16~exp5) experimental; urgency=low + + * apt-pkg/makefile: + - install sha256.h compat header + * apt-pkg/pkgcachegen.{cc,h}: + - use ref-to-ptr semantic in NewDepends() to ensure that the + libapt does not segfault if the cache is remapped in between + (LP: #812862) + - fix crash when P.Arch() was used but the cache got remapped + * apt-pkg/acquire-item.{cc,h}: + - do not check for a "Package" tag in optional index targets + like the translations index + + -- Michael Vogt Fri, 05 Aug 2011 10:57:08 +0200 + + apt (0.8.16~exp4) experimental; urgency=low + + [ Julian Andres Klode ] + * apt-pkg/pkgcache.h: + - [ABI break] Add pkgCache::Header::CacheFileSize, storing the cache size + * apt-pkg/pkgcachegen.cc: + - Write the file size to the cache + * apt-pkg/pkgcache.cc: + - Check that cache is at least CacheFileSize bytes large (LP: #16467) + + [ Michael Vogt ] + * merged latest fixes from debian-sid + * apt-pkg/cdrom.{cc,h}: + - cleanup old ABI break avoidance hacks + * [ABI break] apt-pkg/acquire-item.{cc,h}: + - cleanup around OptionalIndexTarget and SubIndexTarget + * [ABI break] merged patch from Jonathan Thomas to have a new + RecordField() function in the pkgRecorder parser. Many thanks + Thomas + * [ABI break] merge patch from Jonathan Thomas to speed up the + depcache by caching the install-recommends and install-suggests + values + * apt-pkg/contrib/fileutl.{cc,h}: + - add GetModificationTime() helper + * apt-pkg/pkgcachegen.cc: + - regenerate the cache if the sources.list changes to ensure + that changes in the ordering there will be honored by apt + * apt-pkg/sourcelist.{cc,h}: + - add pkgSourceList::GetLastModifiedTime() helper + + -- Michael Vogt Thu, 28 Jul 2011 16:57:08 +0200 + + apt (0.8.16~exp3) experimental; urgency=low + + [ David Kalnischkies ] + * apt-pkg/pkgcache.h: + - readd All{Foreign,Allowed} as suggested by Julian to + remain strictly API compatible + * apt-pkg/acquire*.{cc,h}: + - try even harder to support really big files in the fetcher by + converting (hopefully) everything to 'long long' (Closes: #632271) + * ftparchive/writer.cc: + - generate all checksums in one run over the file for Release + * cmdline/apt-get.cc: + - add an --assume-no option for testing to say 'no' to everything + * apt-pkg/deb/debmetaindex.cc: + - add trusted=yes option to mark unsigned (local) repository as trusted + based on a patch from Ansgar Burchardt, thanks a lot! (Closes: #596498) + + [ Michael Vogt ] + * merge fixes from the debian/unstable upload + * merge lp:~mvo/apt/sha512-template to get fixes for the + sha1/md5 verifiation (closes: #632520) + + -- Michael Vogt Fri, 15 Jul 2011 09:56:17 +0200 + + apt (0.8.16~exp2) experimental; urgency=low + + [ David Kalnischkies ] + * [ABI-Break] Implement EDSP in libapt-pkg so that all front-ends which + use the internal resolver can now be used also with external + ones as the usage is hidden in between the old API + * provide two edsp solvers in apt-utils: + - 'dump' to quickly output a complete scenario and + - 'apt' to use the internal as an external resolver + * apt-pkg/pkgcache.h: + - clean up mess with the "all" handling in MultiArch to + fix LP: #733741 cleanly for everyone now + * apt-pkg/depcache.cc: + - use a boolean instead of an int for Add/Remove in AddStates + similar to how it works with AddSizes + - let the Mark methods return if their marking was successful + - if a Breaks can't be upgraded, remove it. If it or a Conflict + can't be removed the installation of the breaker fails. + * cmdline/apt-get.cc: + - do not discard the error messages from the resolver and instead + only show the general 'Broken packages' message if nothing else + + [ Stefano Zacchiroli ] + * doc/external-dependency-solver-protocol.txt: + - describe EDSP and the configuration interface around it + + [ Michael Vogt ] + * [ABI-Break] merge lp:~mvo/apt/sha512-template to add support for sha512 + * [ABI-Break] merge lp:~mvo/apt/dpointer to support easier extending + without breaking the ABI + * increase ABI version and update package names + + -- Michael Vogt Wed, 29 Jun 2011 13:57:28 +0200 + + apt (0.8.16~exp1) experimental; urgency=low + + * merged with the debian/unstable upload + + -- Michael Vogt Wed, 29 Jun 2011 12:40:31 +0200 + +apt (0.8.15.5.6) UNRELEASED; urgency=low + + * apt-pkg/contrib/fileutl.{cc,h}: + - add GetModificationTime() helper + * apt-pkg/pkgcachegen.cc: + - regenerate the cache if the sources.list changes to ensure + that changes in the ordering there will be honored by apt + * apt-pkg/sourcelist.{cc,h}: + - add pkgSourceList::GetLastModifiedTime() helper + * apt-pkg/pkgcachegen.{cc,h}: + - use ref-to-ptr semantic in NewDepends() to ensure that the + libapt does not segfault if the cache is remapped in between + (LP: #812862) + - fix crash when P.Arch() was used but the cache got remapped + * test/integration/test-hashsum-verification: + - add regression test for hashsum verification + * apt-pkg/acquire-item.cc: + - if no Release.gpg file is found, still load the hashes for + verification (closes: #636314) and add test + + -- Michael Vogt Tue, 12 Jul 2011 11:54:47 +0200 + apt (0.8.15.5) unstable; urgency=low [ David Kalnischkies ] @@@ -231,6 -320,185 +342,185 @@@ apt (0.8.15) unstable; urgency=lo -- Michael Vogt Tue, 28 Jun 2011 18:00:48 +0200 + apt (0.8.15~exp3) experimental; urgency=low + + * debian/control: + - add Breaks: 0.8.15~exp3) for libapt-pkg4.10 and + libapt-inst1.2 (thanks to Jonathan Nieder, closes: #630214) + - use depends for the ${shlibs:Depends} to make the breaks work + + -- Michael Vogt Fri, 17 Jun 2011 21:51:41 +0200 + + apt (0.8.15~exp2) experimental; urgency=low + + * debian/control: + - fix incorrect Replaces (closes: #630204) for libapt-inst1.2 + + -- Michael Vogt Wed, 15 Jun 2011 16:51:14 +0200 + + apt (0.8.15~exp1) experimental; urgency=low + + [ Julian Andres Klode ] + * apt-pkg/depcache.cc: + - Really release action groups only once (Closes: #622744) + - Make purge work again for config-files (LP: #244598) (Closes: #150831) + * apt-pkg/acquire-item.cc: + - Reject files known to be invalid (LP: #346386) (Closes: #627642) + * debian/apt.cron.daily: + - Check power after wait, patch by manuel-soto (LP: #705269) + * debian/control: + - Move ${shlibs:Depends} to Pre-Depends, as we do not want APT + unpacked if a library is too old and thus break upgrades + * doc/apt-key.8.xml: + - Document apt-key net-update (LP: #192810) + + [ Christian Perrier ] + * Galician translation update (Miguel Anxo Bouzada). Closes: #626505 + * Italian translation update (Milo Casagrande). Closes: #627834 + * German documentation translation update (Chris Leick). Closes: #629949 + + [ David Kalnischkies ] + * fix a bunch of cppcheck warnings/errors based on a patch by + Niels Thykier, thanks! (Closes: #622805) + * apt-pkg/depcache.cc: + - really include 'rc' packages in the delete count by fixing a + typo which exists since 1999 in the source… (LP: #761175) + - if critical or-group can't be satisfied, exit directly. + * apt-pkg/acquire-method.cc: + - write directly to stdout instead of creating the message in + memory first before writing to avoid hitting limits + - fix order of CurrentURI and UsedMirror in Status() and Log() + * apt-pkg/orderlist.cc: + - let VisitRProvides report if the calls were successful + * apt-pkg/deb/dpkgpm.cc: + - replace obsolete usleep with nanosleep + * debian/apt{,-utils}.symbols: + - update both experimental symbol-files to reflect 0.8.14 state + * debian/rules: + - remove unused embedded jquery by doxygen from libapt-pkg-doc + * cmdline/apt-mark.cc: + - reimplement apt-mark in c++ + - provide a 'showmanual' command (Closes: #582791) + - provide a 'dpkg --set-selections' wrapper to set/release holds + * cmdline/apt-get.cc: + - deprecate mostly undocumented 'markauto' in favor of 'apt-mark' + * cmdline/apt-cache.cc: + - deprecate mostly undocumented 'showauto' in favor of 'apt-mark' + * apt-pkg/pkgcache.cc: + - really ignore :arch in FindPkg() in non-multiarch environment + * doc/po/de.po: + - undo the translation of the command 'dump' in manpage of apt-config + as report by Burghard Grossmann on debian-l10n-german, thanks! + * apt-pkg/deb/debmetaindex.cc: + - do not download TranslationIndex if no Translation-* will be + downloaded later on anyway (Closes: #624218) + * test/versions.lst: + - disable obscure version number tests with versions dpkg doesn't + allow any more as they don't start with a number + * apt-pkg/acquire-worker.cc: + - print filename in the unmatching size warning (Closes: #623137) + * apt-pkg/acquire-item.cc: + - apply fix for poorly worded 'locate file' error message from + Ben Finney, thanks! (Closes: #623171) + * methods/http.cc: + - add config option to ignore a closed stdin to be able to easily + use the method as a simple standalone downloader + - Location header in redirects should be absolute URI, but some + servers just send an absolute path so still deal with it properly + - dequote URL taken from Location in redirects as we will otherwise + quote an already quoted string in the request later (Closes: #602412) + * apt-pkg/contrib/netrc.cc: + - replace non-posix gnu-extension strdupa with strdup + * apt-pkg/packagemanager.cc: + - ensure for Multi-Arch:same packages that they are unpacked in + lock step even in immediate configuration (Closes: #618288) + + [ Michael Vogt ] + * methods/mirror.cc: + - ignore lines starting with "#" in the mirror file + - ignore non http urls in the mirrors + - append the dist (e.g. sid, wheezy) as a query string when + asking for a suitable mirror + * debian/control: + - add libapt-pkg4.10 and libapt-inst1.2 library packages + + -- Michael Vogt Fri, 10 Jun 2011 15:32:07 +0200 + + apt (0.8.14.2) UNRELEASED; urgency=low + + [ Julian Andres Klode ] + * apt-pkg/depcache.cc: + - Really release action groups only once (Closes: #622744) + - Make purge work again for config-files (LP: #244598) (Closes: #150831) + * debian/apt.cron.daily: + - Check power after wait, patch by manuel-soto (LP: #705269) + * debian/control: + - Move ${shlibs:Depends} to Pre-Depends, as we do not want APT + unpacked if a library is too old and thus break upgrades + * doc/apt-key.8.xml: + - Document apt-key net-update (LP: #192810) + + [ Christian Perrier ] + * Galician translation update (Miguel Anxo Bouzada). Closes: #626505 + + [ David Kalnischkies ] + * fix a bunch of cppcheck warnings/errors based on a patch by + Niels Thykier, thanks! (Closes: #622805) + * apt-pkg/depcache.cc: + - really include 'rc' packages in the delete count by fixing a + typo which exists since 1999 in the source… (LP: #761175) + - if critical or-group can't be satisfied, exit directly. + * apt-pkg/acquire-method.cc: + - write directly to stdout instead of creating the message in + memory first before writing to avoid hitting limits + - fix order of CurrentURI and UsedMirror in Status() and Log() + * apt-pkg/orderlist.cc: + - let VisitRProvides report if the calls were successful + * apt-pkg/deb/dpkgpm.cc: + - replace obsolete usleep with nanosleep + * debian/apt{,-utils}.symbols: + - update both experimental symbol-files to reflect 0.8.14 state + * debian/rules: + - remove unused embedded jquery by doxygen from libapt-pkg-doc + * cmdline/apt-mark.cc: + - reimplement apt-mark in c++ + - provide a 'showmanual' command (Closes: #582791) + - provide a 'dpkg --set-selections' wrapper to set/release holds + * cmdline/apt-get.cc: + - deprecate mostly undocumented 'markauto' in favor of 'apt-mark' + * cmdline/apt-cache.cc: + - deprecate mostly undocumented 'showauto' in favor of 'apt-mark' + * apt-pkg/pkgcache.cc: + - really ignore :arch in FindPkg() in non-multiarch environment + * doc/po/de.po: + - undo the translation of the command 'dump' in manpage of apt-config + as report by Burghard Grossmann on debian-l10n-german, thanks! + * apt-pkg/deb/debmetaindex.cc: + - do not download TranslationIndex if no Translation-* will be + downloaded later on anyway (Closes: #624218) + * test/versions.lst: + - disable obscure version number tests with versions dpkg doesn't + allow any more as they don't start with a number + * apt-pkg/acquire-worker.cc: + - print filename in the unmatching size warning (Closes: #623137) + * apt-pkg/acquire-item.cc: + - apply fix for poorly worded 'locate file' error message from + Ben Finney, thanks! (Closes: #623171) + * methods/http.cc: + - add config option to ignore a closed stdin to be able to easily + use the method as a simple standalone downloader + - Location header in redirects should be absolute URI, but some + servers just send an absolute path so still deal with it properly + - dequote URL taken from Location in redirects as we will otherwise + quote an already quoted string in the request later (Closes: #602412) + * apt-pkg/contrib/netrc.cc: + - replace non-posix gnu-extension strdupa with strdup + * apt-pkg/packagemanager.cc: + - ensure for Multi-Arch:same packages that they are unpacked in + lock step even in immediate configuration (Closes: #618288) + + -- Michael Vogt Mon, 16 May 2011 14:57:52 +0200 + apt (0.8.14.1) unstable; urgency=low * apt-pkg/acquire-item.cc: