X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/ecc138f858fab61e0b888d3d13854d1422c3432b..8d1cb6da6e21302c654da3f09de3975af7e4a11f:/test/integration/test-multiarch-allowed?ds=sidebyside diff --git a/test/integration/test-multiarch-allowed b/test/integration/test-multiarch-allowed index a643cd2dc..98555bc73 100755 --- a/test/integration/test-multiarch-allowed +++ b/test/integration/test-multiarch-allowed @@ -1,8 +1,8 @@ #!/bin/sh set -e -TESTDIR=$(readlink -f $(dirname $0)) -. $TESTDIR/framework +TESTDIR="$(readlink -f "$(dirname "$0")")" +. "$TESTDIR/framework" setupenvironment configarchitecture 'amd64' 'i386' @@ -12,7 +12,7 @@ insertpackage 'unstable' 'needsfooany' 'amd64,i386' '1' 'Depends: foo:any' insertpackage 'unstable' 'needsfoover1' 'amd64,i386' '1' 'Depends: foo:any (>= 1)' insertpackage 'unstable' 'needsfoover2' 'amd64,i386' '1' 'Depends: foo:any (>= 2)' insertpackage 'unstable' 'hatesfoo' 'amd64' '1' 'Conflicts: foo' -insertpackage 'unstable' 'hatesfooany' 'amd64' '1' 'Conflicts: foo:any' # this makes no sense… +insertpackage 'unstable' 'hatesfooany' 'amd64' '1' 'Conflicts: foo:any' # this makes no sense…? insertpackage 'unstable' 'hatesfoonative' 'amd64' '1' 'Conflicts: foo:amd64' insertpackage 'unstable' 'coolfoo' 'amd64' '1' 'Multi-Arch:allowed @@ -21,10 +21,10 @@ 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' 'needscoolfoover0' 'amd64' '1' 'Depends: coolfoo:any (>= 1), coolbar' -insertpackage 'unstable' 'needscoolfoover1' 'amd64' '1' 'Depends: coolfoo:any (>= 1), coolbar (>= 1)' -insertpackage 'unstable' 'needscoolfoover2' 'amd64' '1' 'Depends: coolfoo:any (>= 2), coolbar (>= 1)' -insertpackage 'unstable' 'needscoolfoover3' 'amd64' '1' 'Depends: coolfoo:any (>= 2), coolbar (>= 3)' +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)' +insertpackage 'unstable' 'needscoolfoover3' 'amd64' '1' 'Depends: coolfoo:any (>= 2), coolbar:any (>= 3)' setupaptarchive @@ -40,7 +40,7 @@ The following information may help to resolve the situation: solveableinsinglearch0() { testsuccessequal 'Reading package lists... Building dependency tree... -The following extra packages will be installed: +The following additional packages will be installed: foo The following NEW packages will be installed: foo needsfoo @@ -53,7 +53,7 @@ Conf needsfoo (1 unstable [amd64])' aptget install needsfoo -s solveableinsinglearch0 testsuccessequal 'Reading package lists... Building dependency tree... -The following extra packages will be installed: +The following additional packages will be installed: foo:i386 The following NEW packages will be installed: foo:i386 needsfoo:i386 @@ -74,7 +74,7 @@ E: Unable to correct problems, you have held broken packages." aptget install ne solveableinsinglearch1() { testsuccessequal "Reading package lists... Building dependency tree... -The following extra packages will be installed: +The following additional packages will be installed: foo The following NEW packages will be installed: foo $1 @@ -89,7 +89,7 @@ testneedsfooallgood() { solveableinsinglearch1 $1 testsuccessequal "Reading package lists... Building dependency tree... -The following extra packages will be installed: +The following additional packages will be installed: foo The following NEW packages will be installed: foo $1:i386 @@ -126,7 +126,7 @@ The following packages have unmet dependencies: E: Unable to correct problems, you have held broken packages." NEEDSFOO2FOREIGN="$BADPREFIX The following packages have unmet dependencies: - needsfoover2:i386 : Depends: foo:any:i386 (>= 2) + needsfoover2:i386 : Depends: foo:any (>= 2) E: Unable to correct problems, you have held broken packages." testfailureequal "$NEEDSFOO2NATIVE" aptget install needsfoover2 -s testfailureequal "$NEEDSFOO2FOREIGN" aptget install needsfoover2:i386 -s @@ -138,13 +138,11 @@ solveableinsinglearch2() { The following packages have unmet dependencies: hatesfoo : Conflicts: foo but 1 is to be installed E: Unable to correct problems, you have held broken packages." aptget install foo hatesfoo -s + # the message differs slightly between single and multiarch + testfailuremsg 'E: Unable to correct problems, you have held broken packages.' aptget install foo hatesfooany -s testfailureequal "$BADPREFIX The following packages have unmet dependencies: - hatesfooany : Conflicts: foo:any -E: Unable to correct problems, you have held broken packages." aptget install foo hatesfooany -s - testfailureequal "$BADPREFIX -The following packages have unmet dependencies: - hatesfoonative : Conflicts: foo but 1 is to be installed + hatesfoonative : Conflicts: foo:amd64 E: Unable to correct problems, you have held broken packages." aptget install foo hatesfoonative -s } solveableinsinglearch2 @@ -169,7 +167,7 @@ Conf hatesfoonative (1 unstable [amd64])' aptget install foo:i386 hatesfoonative solveableinsinglearch3() { testsuccessequal "Reading package lists... Building dependency tree... -The following extra packages will be installed: +The following additional packages will be installed: coolfoo The following NEW packages will be installed: coolfoo needscoolfoo @@ -180,7 +178,7 @@ Conf coolfoo (1 unstable [amd64]) Conf needscoolfoo (1 unstable [amd64])" aptget install needscoolfoo -s testsuccessequal "Reading package lists... Building dependency tree... -The following extra packages will be installed: +The following additional packages will be installed: coolfoo The following NEW packages will be installed: coolfoo coolfoover needscoolfoo @@ -191,13 +189,20 @@ 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 - testfailureequal "$BADPREFIX -The following packages have unmet dependencies: - needscoolfooany : Depends: coolbar:any but it is not installable -E: Unable to correct problems, you have held broken packages." aptget install needscoolfooany -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 testsuccessequal 'Reading package lists... Building dependency tree... -The following extra packages will be installed: +The following additional packages will be installed: coolfoo The following NEW packages will be installed: coolfoo needscoolfoover0 @@ -208,7 +213,7 @@ Conf coolfoo (1 unstable [amd64]) Conf needscoolfoover0 (1 unstable [amd64])' aptget install needscoolfoover0 -s testsuccessequal 'Reading package lists... Building dependency tree... -The following extra packages will be installed: +The following additional packages will be installed: coolfoo coolfoover The following NEW packages will be installed: coolfoo coolfoover needscoolfoover1 @@ -226,7 +231,7 @@ E: Unable to correct problems, you have held broken packages." aptget install ne testfailureequal "$BADPREFIX The following packages have unmet dependencies: needscoolfoover3 : Depends: coolfoo:any (>= 2) - Depends: coolbar (>= 3) + Depends: coolbar:any (>= 3) E: Unable to correct problems, you have held broken packages." aptget install needscoolfoover3 -s } solveableinsinglearch3 @@ -237,10 +242,61 @@ configarchitecture 'amd64' solveableinsinglearch0 testfailureequal 'Reading package lists... Building dependency tree... -E: Unable to locate package needsfoo' aptget install needsfoo:i386 -s +E: Unable to locate package needsfoo:i386' aptget install needsfoo:i386 -s solveableinsinglearch1 'needsfooany' solveableinsinglearch1 'needsfoover1' testfailureequal "$NEEDSFOO2NATIVE" aptget install needsfoover2 -s solveableinsinglearch2 solveableinsinglearch3 + +msgmsg 'multi-arch with barbarian archs' +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' + +testsuccess aptget check +testsuccessequal 'Reading package lists... +Building dependency tree... +The following additional packages will be installed: + foo +The following packages will be REMOVED: + foo:armel +The following NEW packages will be installed: + foo needsfooany +0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded. +Remv foo:armel [1] +Inst foo (1 unstable [amd64]) +Inst needsfooany (1 unstable [amd64]) +Conf foo (1 unstable [amd64]) +Conf needsfooany (1 unstable [amd64])' aptget install needsfooany -s +testsuccessequal 'Reading package lists... +Building dependency tree... +The following additional packages will be installed: + foo +The following packages will be REMOVED: + foo:armel +The following NEW packages will be installed: + foo needsfooany:i386 +0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded. +Remv foo:armel [1] +Inst foo (1 unstable [amd64]) +Inst needsfooany:i386 (1 unstable [i386]) +Conf foo (1 unstable [amd64]) +Conf needsfooany:i386 (1 unstable [i386])' aptget install needsfooany:i386 -s +testsuccessequal 'Reading package lists... +Building dependency tree... +The following additional packages will be installed: + coolfoo +The following packages will be REMOVED: + 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 ] +Inst coolfoo (1 unstable [amd64]) +Inst needscoolfoover0 (1 unstable [amd64]) +Conf coolfoo (1 unstable [amd64]) +Conf needscoolfoover0 (1 unstable [amd64])' aptget install needscoolfoover0 -s