From 6f22aa086954064b2ee58cd11b50832b242d54ad Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 10 May 2014 14:21:10 +0200 Subject: add an additional test for arch specific conflicts In bugreport #747261 I confirmed with this testcase that apt actually supports the requested architecture-specific conflicts already since 2012 with commit cef094c2ec8214b2783a2ac3aa70cf835381eae1. The old test only does simulations which are handy to check apt, this one builds 'real' packages to see if dpkg agrees with us. Git-Dch: Ignore --- .../test-bug-747261-arch-specific-conflicts | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 test/integration/test-bug-747261-arch-specific-conflicts (limited to 'test/integration/test-bug-747261-arch-specific-conflicts') diff --git a/test/integration/test-bug-747261-arch-specific-conflicts b/test/integration/test-bug-747261-arch-specific-conflicts new file mode 100755 index 000000000..bfb2d089f --- /dev/null +++ b/test/integration/test-bug-747261-arch-specific-conflicts @@ -0,0 +1,36 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'amd64' 'sparc' 'armel' + +buildsimplenativepackage 'libc6' 'amd64,sparc,armel' '1' 'stable' 'Multi-Arch: same' +buildsimplenativepackage 'libc6-i386' 'amd64' '1' 'stable' 'Conflicts: libc6:sparc' + +setupaptarchive + +testsuccess aptget install 'libc6:amd64' 'libc6:sparc' -y +testdpkginstalled 'libc6:amd64' 'libc6:sparc' +testdpkgnotinstalled 'libc6-i386' 'libc6:armel' + +testsuccess aptget install libc6-i386 -y +testdpkginstalled 'libc6:amd64' 'libc6-i386' +testdpkgnotinstalled 'libc6:sparc' 'libc6:armel' + +testsuccess aptget install libc6:armel -y +testdpkginstalled 'libc6:amd64' 'libc6:armel' 'libc6-i386' +testdpkgnotinstalled 'libc6:sparc' + +testsuccess aptget install libc6:sparc -y +testdpkginstalled 'libc6:amd64' 'libc6:armel' 'libc6:sparc' +testdpkgnotinstalled 'libc6-i386' + +testsuccess aptget purge 'libc6:*' 'libc6-i386' -y +testdpkgnotinstalled 'libc6:amd64' 'libc6:armel' 'libc6:sparc' 'libc6-i386' + +# check that (the actually simpler) single arch is fine, too +configarchitecture 'amd64' +testfailure aptget install libc6:sparc -s +testsuccess aptget install libc6 libc6-i386 -y -- cgit v1.2.3 From e1a69e71efc0679815f722480169f16bf02622ab Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 12 May 2014 21:25:43 +0200 Subject: (try to) fix travis-ci build failures dpkg on Ubuntu 12.04 does not seem to support parsing arch-specific dependencies, so we try to detect if we face such a dpkg in the test. In the other test the order depends on libdb, which changes per arch, so we just run it through our sorting binary and be happy (hopefully). Git-Dch: Ignore --- test/integration/test-bug-747261-arch-specific-conflicts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'test/integration/test-bug-747261-arch-specific-conflicts') diff --git a/test/integration/test-bug-747261-arch-specific-conflicts b/test/integration/test-bug-747261-arch-specific-conflicts index bfb2d089f..be971b89e 100755 --- a/test/integration/test-bug-747261-arch-specific-conflicts +++ b/test/integration/test-bug-747261-arch-specific-conflicts @@ -6,6 +6,21 @@ TESTDIR=$(readlink -f $(dirname $0)) setupenvironment configarchitecture 'amd64' 'sparc' 'armel' +msgtest 'Check that dpkg supports' 'arch-specific dependencies' +set +e +# this fails always, the question is just how it fails +dpkg-checkbuilddeps -d 'foobar:barfoo' /dev/null 2>/dev/null >/dev/null +RETURNCODE=$? +set -e +if [ "$RETURNCODE" != '1' ]; then + dpkg-checkbuilddeps -d 'foobar:barfoo' /dev/null || true + echo "Command had returncode: $RETURNCODE" + msgskip + exit 0 +else + msgpass +fi + buildsimplenativepackage 'libc6' 'amd64,sparc,armel' '1' 'stable' 'Multi-Arch: same' buildsimplenativepackage 'libc6-i386' 'amd64' '1' 'stable' 'Conflicts: libc6:sparc' -- cgit v1.2.3