diff options
author | David Kalnischkies <david@kalnischkies.de> | 2021-09-03 20:45:04 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2021-09-04 15:35:15 +0200 |
commit | 20745375afb333fd3d442006f3c6ebbebe195dab (patch) | |
tree | 63ac397573697971b346f2f51049418c81a56e99 /test | |
parent | 017b3d0ae5232628c15324204e607e76487afb99 (diff) |
Do not make provides of M-A:allowed implicit M-A:foreign
As we don't know which architectures we will deal with and to avoid
creating many "unneeded" packages (and provides) the cache
generation uses a scheme of on-demand creation (see ecc138f858).
This assumed a particular handling of :any which got changed later
(3addaba1ff) making this code path not only no longer needed for
M-A:allowed, but actually wrong as it would go on and create provides
for the explicit Provides of a package as if the package would be
M-A:foreign.
The result was that a package A:amd64 providing B tagged as M-A:allowed
would satisfy a "C:armel depends on B". Note that this bug does NOT
effect "C:armel depends on A" which is (correctly) not satisfied as
before.
References: ecc138f858, 3addaba1ff
Diffstat (limited to 'test')
-rwxr-xr-x | test/integration/test-multiarch-allowed | 50 |
1 files changed, 33 insertions, 17 deletions
diff --git a/test/integration/test-multiarch-allowed b/test/integration/test-multiarch-allowed index b9af20084..69d0bfa10 100755 --- a/test/integration/test-multiarch-allowed +++ b/test/integration/test-multiarch-allowed @@ -19,8 +19,8 @@ insertpackage 'unstable' 'coolfoo' 'amd64' '1' 'Multi-Arch:allowed Provides: coolbar' insertpackage 'unstable' 'coolfoover' 'amd64' '1' 'Multi-Arch:allowed Provides: coolbar (= 2)' -insertpackage 'unstable' 'needscoolfoo' 'amd64' '1' 'Depends: coolfoo, coolbar' -insertpackage 'unstable' 'needscoolfooany' 'amd64' '1' 'Depends: coolfoo:any, coolbar:any' +insertpackage 'unstable' 'needscoolfoo' 'amd64,i386' '1' 'Depends: coolfoo, coolbar' +insertpackage 'unstable' 'needscoolfooany' 'amd64,i386' '1' 'Depends: coolfoo:any, coolbar:any' insertpackage 'unstable' 'needscoolfoover0' 'amd64' '1' 'Depends: coolfoo:any (>= 1), coolbar:any' insertpackage 'unstable' 'needscoolfoover1' 'amd64' '1' 'Depends: coolfoo:any (>= 1), coolbar:any (>= 1)' insertpackage 'unstable' 'needscoolfoover2' 'amd64' '1' 'Depends: coolfoo:any (>= 2), coolbar:any (>= 1)' @@ -166,6 +166,28 @@ Inst hatesfoonative (1 unstable [amd64]) Conf foo:i386 (1 unstable [i386]) Conf hatesfoonative (1 unstable [amd64])' aptget install foo:i386 hatesfoonative -s +testfailureequal "$BADPREFIX +The following packages have unmet dependencies: + needscoolfoo:i386 : Depends: coolfoo:i386 but it is not installable + Depends: coolbar:i386 but it is not installable +E: Unable to correct problems, you have held broken packages." aptget install needscoolfoo:i386 -s +solveneedscoolfooanyin() { + local NEEDSCOOL='needscoolfooany' + if [ "$1" != 'amd64' ]; then NEEDSCOOL="${NEEDSCOOL}:$1"; fi + testsuccessequal "Reading package lists... +Building dependency tree... +The following additional packages will be installed: + coolfoo +The following NEW packages will be installed: + coolfoo $NEEDSCOOL +0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. +Inst coolfoo (1 unstable [amd64]) +Inst $NEEDSCOOL (1 unstable [$1]) +Conf coolfoo (1 unstable [amd64]) +Conf $NEEDSCOOL (1 unstable [$1])" aptget install $NEEDSCOOL -s +} +solveneedscoolfooanyin 'i386' + solveableinsinglearch3() { testsuccessequal "Reading package lists... Building dependency tree... @@ -191,17 +213,7 @@ Inst needscoolfoo (1 unstable [amd64]) Conf coolfoo (1 unstable [amd64]) Conf coolfoover (1 unstable [amd64]) Conf needscoolfoo (1 unstable [amd64])" aptget install needscoolfoo coolfoover -s - testsuccessequal "Reading package lists... -Building dependency tree... -The following additional packages will be installed: - coolfoo -The following NEW packages will be installed: - coolfoo needscoolfooany -0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. -Inst coolfoo (1 unstable [amd64]) -Inst needscoolfooany (1 unstable [amd64]) -Conf coolfoo (1 unstable [amd64]) -Conf needscoolfooany (1 unstable [amd64])" aptget install needscoolfooany -s + solveneedscoolfooanyin 'amd64' testsuccessequal 'Reading package lists... Building dependency tree... The following additional packages will be installed: @@ -258,7 +270,9 @@ configarchitecture 'amd64' 'i386' insertinstalledpackage 'foo' 'armel' '1' 'Multi-Arch: allowed' insertinstalledpackage 'coolfoo' 'armel' '1' 'Multi-Arch:allowed Provides: coolbar' -insertinstalledpackage 'bar-needer' 'armel' '1.0' 'Depends: coolbar:any' +insertinstalledpackage 'bar-needer' 'armel' '1.0' 'Depends: coolbar' +insertinstalledpackage 'bar-any-needer' 'armel' '1.0' 'Depends: coolbar:any' +insertinstalledpackage 'bar-armel-needer' 'armel' '1.0' 'Depends: coolbar:armel' testsuccess aptget check testsuccessequal 'Reading package lists... @@ -294,11 +308,13 @@ Building dependency tree... The following additional packages will be installed: coolfoo The following packages will be REMOVED: - coolfoo:armel + bar-armel-needer:armel bar-needer:armel coolfoo:armel The following NEW packages will be installed: coolfoo needscoolfoover0 -0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded. -Remv coolfoo:armel [1] [bar-needer:armel ] +0 upgraded, 2 newly installed, 3 to remove and 0 not upgraded. +Remv bar-armel-needer:armel [1.0] +Remv bar-needer:armel [1.0] +Remv coolfoo:armel [1] [bar-any-needer:armel ] Inst coolfoo (1 unstable [amd64]) Inst needscoolfoover0 (1 unstable [amd64]) Conf coolfoo (1 unstable [amd64]) |