From: Michael Vogt Date: Tue, 4 May 2010 08:02:15 +0000 (+0200) Subject: merged from the debian-sid branch X-Git-Tag: 0.8.0~9^2~59 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/549edd163e34a50091623b47881f2eefbdc53aca merged from the debian-sid branch --- 549edd163e34a50091623b47881f2eefbdc53aca diff --cc apt-pkg/depcache.cc index 75f69ee11,0f30f13c2..2c7cdd5c2 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@@ -175,36 -174,24 +175,36 @@@ bool pkgDepCache::readStateFile(OpProgr pkgTagFile tagfile(&state_file); pkgTagSection section; - int amt=0; - bool debug_autoremove=_config->FindB("Debug::pkgAutoRemove",false); + int amt = 0; + bool const debug_autoremove = _config->FindB("Debug::pkgAutoRemove",false); while(tagfile.Step(section)) { - string pkgname = section.FindS("Package"); - pkgCache::PkgIterator pkg=Cache->FindPkg(pkgname); - // Silently ignore unknown packages and packages with no actual - // version. - if(!pkg.end() && !pkg.VersionList().end()) { - short reason = section.FindI("Auto-Installed", 0); - if(reason > 0) - PkgState[pkg->ID].Flags |= Flag::Auto; - if(debug_autoremove) - std::clog << "Auto-Installed : " << pkgname << std::endl; - amt+=section.size(); - if(Prog != NULL) - Prog->OverallProgress(amt, file_size, 1, - _("Reading state information")); + string const pkgname = section.FindS("Package"); + string pkgarch = section.FindS("Architecture"); + if (pkgarch.empty() == true) + pkgarch = "any"; + pkgCache::PkgIterator pkg = Cache->FindPkg(pkgname, pkgarch); + // Silently ignore unknown packages and packages with no actual version. + if(pkg.end() == true || pkg->VersionList == 0) + continue; + + short const reason = section.FindI("Auto-Installed", 0); + if(reason > 0) + { + PkgState[pkg->ID].Flags |= Flag::Auto; + if (unlikely(debug_autoremove)) - std::cout << "Auto-Installed : " << pkg.FullName() << std::endl; ++ std::clog << "Auto-Installed : " << pkg.FullName() << std::endl; + if (pkgarch == "any") + { + pkgCache::GrpIterator G = pkg.Group(); + for (pkg = G.NextPkg(pkg); pkg.end() != true; pkg = G.NextPkg(pkg)) + if (pkg->VersionList != 0) + PkgState[pkg->ID].Flags |= Flag::Auto; + } } + amt += section.size(); + if(Prog != NULL) + Prog->OverallProgress(amt, file_size, 1, + _("Reading state information")); } if(Prog != NULL) Prog->OverallProgress(file_size, file_size, 1, @@@ -1772,7 -1511,7 +1772,7 @@@ bool pkgDepCache::Sweep() /*{{{* { state.Garbage=true; if(debug_autoremove) - std::cout << "Garbage: " << p.FullName() << std::endl; - std::clog << "Garbage: " << p.Name() << std::endl; ++ std::clog << "Garbage: " << p.FullName() << std::endl; } } diff --cc debian/changelog index 9e3223abf,eb618118d..2c2b038b6 --- a/debian/changelog +++ b/debian/changelog @@@ -1,11 -1,17 +1,19 @@@ -apt (0.7.26~exp4) unstable; urgency=low +apt (0.7.26~exp4) UNRELEASEDexperimental; urgency=low + * [ Abi break ] apt-pkg/acquire-item.{cc,h}: + - add "IsIndexFile" to constructor of pkgAcqFile so that it sends + the right cache control headers + * cmdline/apt-get.cc: + - fix crash when pkg.VersionList() is empty + * apt-pkg/depcache.cc: + - fix incorrect std::cout usage for debug output + * test/libapt/getlanguages_test.cc: + - Add test for Esperanto that has nocounty associated with them + (LP: #560956) - -- Michael Vogt Thu, 08 Apr 2010 20:56:30 +0200 + -- Michael Vogt Tue, 04 May 2010 09:55:08 +0200 -apt (0.7.26~exp3) UNRELEASED; urgency=low +apt (0.7.26~exp3) experimental; urgency=low [ Christian Perrier ] * German translation update. Closes: #571037