diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2012-01-19 16:28:20 +0100 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2012-01-19 16:28:20 +0100 |
commit | 7720666fba9cd7024009bed964ccfa3f2be97c59 (patch) | |
tree | c005fed12d9e87411fd69ed79a675e271c68c8fc | |
parent | 8737e3dca39af0d8758677fc1884b5720124f96b (diff) |
* apt-pkg/deb/dpkgpm.cc:
- fix segfault on pkg removal
-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 ] |