From ff6bf1be3844bcda15303efc81e234ede7501e3c Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 19 Jun 2007 18:20:45 +0200 Subject: * fix some warnings --- apt-pkg/depcache.cc | 1 - 1 file changed, 1 deletion(-) (limited to 'apt-pkg/depcache.cc') diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index 5979f8379..50a75843f 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -216,7 +216,6 @@ bool pkgDepCache::writeStateFile(OpProgress *prog, bool InstalledOnly) pkgCache::PkgIterator pkg=Cache->FindPkg(pkgname); if(pkg.end() || pkg.VersionList().end()) continue; - bool oldAuto = section.FindI("Auto-Installed"); bool newAuto = (PkgState[pkg->ID].Flags & Flag::Auto); if(_config->FindB("Debug::pkgAutoRemove",false)) std::clog << "Update exisiting AutoInstall info: " -- cgit v1.2.3 From 36baa77ad9711a98c1407990a2f04acf666d4408 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 29 Jun 2007 22:40:44 +0200 Subject: * fixes in the auto-mark code (thanks to Daniel Burrows) --- apt-pkg/depcache.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'apt-pkg/depcache.cc') diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index 50a75843f..7f5719454 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -1285,6 +1285,7 @@ void pkgDepCache::MarkPackage(const pkgCache::PkgIterator &pkg, bool follow_suggests) { pkgDepCache::StateCache &state = PkgState[pkg->ID]; + VerIterator currver = pkg.CurrentVer(); VerIterator candver = state.CandidateVerIter(*this); VerIterator instver = state.InstVerIter(*this); @@ -1305,9 +1306,11 @@ void pkgDepCache::MarkPackage(const pkgCache::PkgIterator &pkg, } #endif - // Ignore versions other than the InstVer, and ignore packages - // that are already going to be removed or just left uninstalled. - if(!(ver == instver && !instver.end())) + // For packages that are not going to be removed, ignore versions + // other than the InstVer. For packages that are going to be + // removed, ignore versions other than the current version. + if(!(ver == instver && !instver.end()) && + !(ver == currver && instver.end() && !ver.end())) return; // if we are marked already we are done -- cgit v1.2.3