summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2010-08-20 19:09:16 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2010-08-20 19:09:16 +0200
commit75954ae2420ae7755d8482f2f1eecc03595a5153 (patch)
tree582ec4e5bb4f3975e8374e409d5b261b55daa665 /apt-pkg
parentcd725954f6df5b809fe8d90ee135e222d1cef30e (diff)
* apt-pkg/deb/dpkgpm.cc:
- use the InstVer instead of the CurrentVer for the autobit transfer Add also a small testcase to check the handling automatical
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/deb/dpkgpm.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index aa0b04bd5..5530ef129 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -554,7 +554,7 @@ void pkgDPkgPM::handleDisappearAction(string const &pkgname)
// the disappeared package was auto-installed - nothing to do
if ((Cache[Pkg].Flags & pkgCache::Flag::Auto) == pkgCache::Flag::Auto)
return;
- pkgCache::VerIterator PkgVer = Pkg.CurrentVer();
+ pkgCache::VerIterator PkgVer = Cache[Pkg].InstVerIter(Cache);
if (unlikely(PkgVer.end() == true))
return;
/* search in the list of dependencies for (Pre)Depends,
@@ -571,7 +571,9 @@ void pkgDPkgPM::handleDisappearAction(string const &pkgname)
// the package is already marked as manual
if ((Cache[Tar].Flags & pkgCache::Flag::Auto) != pkgCache::Flag::Auto)
continue;
- pkgCache::VerIterator TarVer = Tar.CurrentVer();
+ pkgCache::VerIterator TarVer = Cache[Tar].InstVerIter(Cache);
+ if (TarVer.end() == true)
+ continue;
for (pkgCache::DepIterator Rep = TarVer.DependsList(); Rep.end() != true; ++Rep)
{
if (Rep->Type != pkgCache::Dep::Replaces)