summaryrefslogtreecommitdiff
path: root/apt-pkg/depcache.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2007-07-09 17:26:23 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2007-07-09 17:26:23 +0100
commit89b52526ec245cacdbac1b4aee6c877dc9a410e4 (patch)
treeaefd59c6227ad18395a06892a8dd3371776995a1 /apt-pkg/depcache.cc
parentd52cf756b5e14c200ba502bed546254e464799cc (diff)
parent6724d2173133f24bc8a3875c13513761f9340627 (diff)
* merged apt--mvo
* reverted b-d changes * make upate-po
Diffstat (limited to 'apt-pkg/depcache.cc')
-rw-r--r--apt-pkg/depcache.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc
index ca9636cc1..769bd072e 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: "
@@ -1286,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);
@@ -1306,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