diff options
author | David Kalnischkies <david@kalnischkies.de> | 2020-05-19 11:20:28 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2020-05-19 11:22:19 +0200 |
commit | dcd920e99df964d320e18ac133d575d4151deb85 (patch) | |
tree | fd76fae83ae0e7a1b7be8af1b0daeb0de29d780e | |
parent | 1af12dd37acbb2c3987b71d85113f68d1f2bea1e (diff) |
Check satisfiability for versioned provides, not providing version
References: dcdfb4723a9969b443d1c823d735e192c731df69
-rw-r--r-- | apt-pkg/cacheset.cc | 2 | ||||
-rwxr-xr-x | test/integration/test-dpkg-i-apt-install-fix-broken | 34 |
2 files changed, 35 insertions, 1 deletions
diff --git a/apt-pkg/cacheset.cc b/apt-pkg/cacheset.cc index 59d96ffc0..565a2b298 100644 --- a/apt-pkg/cacheset.cc +++ b/apt-pkg/cacheset.cc @@ -599,7 +599,7 @@ bool VersionContainerInterface::FromDependency(VersionContainerInterface * const continue; auto const OP = Prv.OwnerPkg(); auto const TV = getTargetVersion(OP); - if (Prv.OwnerVer() == TV && D.IsSatisfied(TV)) + if (Prv.OwnerVer() == TV && D.IsSatisfied(Prv)) { vci->insert(TV); found = true; diff --git a/test/integration/test-dpkg-i-apt-install-fix-broken b/test/integration/test-dpkg-i-apt-install-fix-broken new file mode 100755 index 000000000..8d800ffb7 --- /dev/null +++ b/test/integration/test-dpkg-i-apt-install-fix-broken @@ -0,0 +1,34 @@ +#!/bin/sh +set -e + +TESTDIR="$(readlink -f "$(dirname "$0")")" +. "$TESTDIR/framework" +setupenvironment +configarchitecture 'amd64' + +buildsimplenativepackage 'autopkgtest-satdep' 'amd64' '1' 'stable' 'Depends: debhelper-compat (= 12)' +buildsimplenativepackage 'debhelper' 'all' '1' 'stable' 'Provides: debhelper-compat (= 12)' + +setupaptarchive + +testfailure dpkg -i incoming/autopkgtest-*.deb +testsuccessequal 'Reading package lists... +Building dependency tree... +Correcting dependencies... MarkInstall autopkgtest-satdep:amd64 < 1 @iU mK Nb Ib > FU=0 + MarkInstall debhelper:amd64 < none -> 1 @un uN > FU=0 +Starting pkgProblemResolver with broken count: 0 +Starting 2 pkgProblemResolver with broken count: 0 +Done + Done +Starting pkgProblemResolver with broken count: 0 +Starting 2 pkgProblemResolver with broken count: 0 +Done +The following additional packages will be installed: + debhelper +The following NEW packages will be installed: + debhelper +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +1 not fully installed or removed. +Inst debhelper (1 stable [all]) +Conf debhelper (1 stable [all]) +Conf autopkgtest-satdep (1 stable [amd64])' apt install -fso Debug::pkgProblemResolver=1 -o DEbug::pkgDepCache::Marker=1 |