From 7605509f7cc97e5e94d3159f9cd5c2c98b876720 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 19 Sep 2012 11:35:53 +0200 Subject: * apt-pkg/pkgcachegen.cc: - ensure that dependencies for packages:none are always generated --- apt-pkg/pkgcachegen.cc | 2 +- debian/changelog | 8 ++++++++ .../test-bug-686346-package-missing-architecture | 22 ++++++++++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc index 54b07c465..5f37330c9 100644 --- a/apt-pkg/pkgcachegen.cc +++ b/apt-pkg/pkgcachegen.cc @@ -922,7 +922,7 @@ bool pkgCacheGenerator::ListParser::NewDepends(pkgCache::VerIterator &Ver, // Locate the target package pkgCache::PkgIterator Pkg = Grp.FindPkg(Arch); // we don't create 'none' packages and their dependencies if we can avoid it … - if (Pkg.end() == true && Arch == "none") + if (Pkg.end() == true && Arch == "none" && strcmp(Ver.ParentPkg().Arch(), "none") != 0) return true; Dynamic DynPkg(Pkg); if (Pkg.end() == true) { diff --git a/debian/changelog b/debian/changelog index 86f8579a7..5b0d049b7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +apt (0.9.7.6) UNRELEASED; urgency=low + + [ David Kalnischkies ] + * apt-pkg/pkgcachegen.cc: + - ensure that dependencies for packages:none are always generated + + -- David Kalnischkies Wed, 19 Sep 2012 11:29:56 +0200 + apt (0.9.7.5) unstable; urgency=low [ Manpages translation updates ] diff --git a/test/integration/test-bug-686346-package-missing-architecture b/test/integration/test-bug-686346-package-missing-architecture index b0e0aa3c4..b2c9ec9ee 100755 --- a/test/integration/test-bug-686346-package-missing-architecture +++ b/test/integration/test-bug-686346-package-missing-architecture @@ -85,3 +85,25 @@ The following packages have unmet dependencies: pkgg : Conflicts: pkgb but 2 is installed Conflicts: pkgb:none but 1 is installed E: Unmet dependencies. Try using -f." aptget check + +# check that dependencies are generated for none-packages +rm rootdir/var/lib/dpkg/status +insertinstalledpackage 'pkgx' 'none' '1' +insertinstalledpackage 'pkgy' 'none' '1' 'Depends: pkgz, pkgx (>= 1)' +insertinstalledpackage 'pkgz' 'none' '1' +testequal 'Reading package lists... +Building dependency tree... +Reading state information... +The following packages will be REMOVED: + pkgx:none* pkgy:none* +0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded. +Purg pkgy:none [1] +Purg pkgx:none [1]' aptget purge pkgx -s +testequal 'Reading package lists... +Building dependency tree... +Reading state information... +The following packages will be REMOVED: + pkgy:none* pkgz:none* +0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded. +Purg pkgy:none [1] +Purg pkgz:none [1]' aptget purge pkgz -s -- cgit v1.2.3