X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/259d88d94843fbce7c8100f8b337b7b8fb58b840..8757a0f:/test/integration/test-bug-720597-build-dep-purge?ds=sidebyside diff --git a/test/integration/test-bug-720597-build-dep-purge b/test/integration/test-bug-720597-build-dep-purge index 1e24ed5f1..4b36989ee 100755 --- a/test/integration/test-bug-720597-build-dep-purge +++ b/test/integration/test-bug-720597-build-dep-purge @@ -1,19 +1,23 @@ #!/bin/sh set -e -TESTDIR=$(readlink -f $(dirname $0)) -. $TESTDIR/framework +TESTDIR="$(readlink -f "$(dirname "$0")")" +. "$TESTDIR/framework" setupenvironment -configarchitecture 'amd64' + +# we need this construct here as it isn't really possible to fake native arch for dpkg-* tools +NATIVE="$(command dpkg --print-architecture)" +configarchitecture $NATIVE insertinstalledpackage 'build-essential' 'all' '11.5' 'Multi-Arch: foreign' insertinstalledpackage 'pkga' 'all' '1' -buildsimplenativepackage 'pkgb' 'amd64' '1' 'stable' 'Conflicts: pkga' -buildsimplenativepackage 'pkgc' 'amd64' '1' 'stable' 'Build-Depends: pkgb' +buildsimplenativepackage 'pkgb' "$NATIVE" '1' 'stable' 'Conflicts: pkga' +buildsimplenativepackage 'pkgc' "$NATIVE" '1' 'stable' 'Build-Depends: pkgb' setupaptarchive -testequal 'Reading package lists... +testsuccessequal "Reading package lists... +Reading package lists... Building dependency tree... The following packages will be REMOVED: pkga @@ -21,10 +25,11 @@ The following NEW packages will be installed: pkgb 0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded. Remv pkga [1] -Inst pkgb (1 stable [amd64]) -Conf pkgb (1 stable [amd64])' aptget build-dep pkgc -s +Inst pkgb (1 stable [$NATIVE]) +Conf pkgb (1 stable [$NATIVE])" aptget build-dep pkgc -s -testequal 'Reading package lists... +testsuccessequal "Reading package lists... +Reading package lists... Building dependency tree... The following packages will be REMOVED: pkga* @@ -32,5 +37,29 @@ The following NEW packages will be installed: pkgb 0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded. Purg pkga [1] -Inst pkgb (1 stable [amd64]) -Conf pkgb (1 stable [amd64])' aptget build-dep pkgc -s --purge +Inst pkgb (1 stable [$NATIVE]) +Conf pkgb (1 stable [$NATIVE])" aptget build-dep pkgc -s --purge + +testsuccessequal 'Reading package lists... +Building dependency tree... +0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' apt autoremove -s +testdpkgnotinstalled pkgb +testsuccess apt build-dep pkgc -y -o Debug::pkgDepCache::AutoInstall=1 -o Debug::pkgDepCache::Marker=1 +testdpkginstalled pkgb +testsuccessequal 'Reading package lists... +Building dependency tree... +Reading state information... +0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' apt autoremove -s +testsuccess apt purge pkgb pkgc -y +testsuccessequal 'Reading package lists... +Building dependency tree... +Reading state information... +0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' apt autoremove -s +testsuccess apt build-dep pkgc -y -o APT::Get::Build-Dep-Automatic=true +testsuccessequal 'Reading package lists... +Building dependency tree... +Reading state information... +The following packages will be REMOVED: + pkgb +0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. +Remv pkgb [1]' apt autoremove -s