diff options
-rw-r--r-- | apt-pkg/deb/dpkgpm.cc | 6 | ||||
-rw-r--r-- | debian/changelog | 8 |
2 files changed, 13 insertions, 1 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc index 6feada4cc..99c28d201 100644 --- a/apt-pkg/deb/dpkgpm.cc +++ b/apt-pkg/deb/dpkgpm.cc @@ -1090,8 +1090,12 @@ bool pkgDPkgPM::Go(int OutStatusFd) } else { + pkgCache::VerIterator PkgVer; std::string name = I->Pkg.Name(); - pkgCache::VerIterator PkgVer = Cache[I->Pkg].InstVerIter(Cache); + if (Op == Item::Remove || Op == Item::Purge) + PkgVer = I->Pkg.CurrentVer(); + else + PkgVer = Cache[I->Pkg].InstVerIter(Cache); name.append(":").append(PkgVer.Arch()); char * const fullname = strdup(name.c_str()); Packages.push_back(fullname); diff --git a/debian/changelog b/debian/changelog index bf23ec1eb..d8316abf6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +apt (0.8.16~exp12) experimental; urgency=low + + [ Michael Vogt ] + * apt-pkg/deb/dpkgpm.cc: + - fix segfault on pkg removal + + -- Michael Vogt <michael.vogt@ubuntu.com> Thu, 19 Jan 2012 16:28:03 +0100 + apt (0.8.16~exp11) experimental; urgency=low [ David Kalnischkies ] |