From 86f33b2382bbc8a4c06343801564f6a74e3081f4 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 19 Aug 2010 00:31:55 +0200 Subject: * apt-pkg/deb/debsystem.cc: - set dir::state::status based at least on dir --- apt-pkg/deb/debsystem.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/deb') diff --git a/apt-pkg/deb/debsystem.cc b/apt-pkg/deb/debsystem.cc index 7056d771d..ab08a8f4d 100644 --- a/apt-pkg/deb/debsystem.cc +++ b/apt-pkg/deb/debsystem.cc @@ -165,7 +165,7 @@ bool debSystem::Initialize(Configuration &Cnf) which is yet to be determined. The functions in pkgcachegen should be the only users of these */ Cnf.CndSet("Dir::State::extended_states", Cnf.FindDir("Dir::State").append("extended_states")); - Cnf.CndSet("Dir::State::status","/var/lib/dpkg/status"); + Cnf.CndSet("Dir::State::status", Cnf.FindDir("Dir", "/").append("var/lib/dpkg/status")); Cnf.CndSet("Dir::Bin::dpkg","/usr/bin/dpkg"); if (StatusFile) { -- cgit v1.2.3 From 75954ae2420ae7755d8482f2f1eecc03595a5153 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 20 Aug 2010 19:09:16 +0200 Subject: * 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 --- apt-pkg/deb/dpkgpm.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'apt-pkg/deb') 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) -- cgit v1.2.3