From 84aa13f4e620c460c98b351a6ef12027d8d6da9c Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 16 Mar 2011 18:18:32 +0100 Subject: enable buildsimplenativepackage to build packages for multiple architectures in a row as it is needed for Multi-Arch:same that the shared files are the same --- test/integration/framework | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'test/integration') diff --git a/test/integration/framework b/test/integration/framework index 71e7e476c..4b1b98c4e 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -261,18 +261,22 @@ Package: $NAME" > ${BUILDDIR}/debian/control fi echo '3.0 (native)' > ${BUILDDIR}/debian/source/format local SRCS="$( (cd ${BUILDDIR}/..; dpkg-source -b ${NAME}-${VERSION} 2>&1) | grep '^dpkg-source: info: building' | grep -o '[a-z0-9._+~-]*$')" - - mkdir -p ${BUILDDIR}/debian/tmp/DEBIAN ${BUILDDIR}/debian/tmp/usr/share/doc/${NAME} ${BUILDDIR}/debian/tmp/usr/bin - cp ${BUILDDIR}/debian/copyright ${BUILDDIR}/debian/changelog ${BUILDDIR}/FEATURES ${BUILDDIR}/debian/tmp/usr/share/doc/${NAME} - cp ${BUILDDIR}/${NAME} ${BUILDDIR}/debian/tmp/usr/bin - (cd ${BUILDDIR}; dpkg-gencontrol -DArchitecture=$ARCH) - (cd ${BUILDDIR}/debian/tmp; md5sum $(find usr/ -type f) > DEBIAN/md5sums) - - dpkg-deb --build ${BUILDDIR}/debian/tmp ${BUILDDIR}/.. 2> /dev/null > /dev/null - echo "pool/${NAME}_${VERSION}_${ARCH}.deb" >> ${BUILDDIR}/../${RELEASE}.${DISTSECTION}.pkglist for SRC in $SRCS; do echo "pool/${SRC}" >> ${BUILDDIR}/../${RELEASE}.${DISTSECTION}.srclist done + + for arch in $(echo "$ARCH" | sed -e 's#,#\n#g'); do + rm -rf ${BUILDDIR}/debian/tmp + mkdir -p ${BUILDDIR}/debian/tmp/DEBIAN ${BUILDDIR}/debian/tmp/usr/share/doc/${NAME} ${BUILDDIR}/debian/tmp/usr/bin + cp ${BUILDDIR}/debian/copyright ${BUILDDIR}/debian/changelog ${BUILDDIR}/FEATURES ${BUILDDIR}/debian/tmp/usr/share/doc/${NAME} + cp ${BUILDDIR}/${NAME} ${BUILDDIR}/debian/tmp/usr/bin/${NAME}-${arch} + (cd ${BUILDDIR}; dpkg-gencontrol -DArchitecture=$arch) + (cd ${BUILDDIR}/debian/tmp; md5sum $(find usr/ -type f) > DEBIAN/md5sums) + + dpkg-deb --build ${BUILDDIR}/debian/tmp ${BUILDDIR}/.. 2> /dev/null > /dev/null + echo "pool/${NAME}_${VERSION}_${arch}.deb" >> ${BUILDDIR}/../${RELEASE}.${DISTSECTION}.pkglist + done + mkdir -p ${BUILDDIR}/../${NAME}_${VERSION} cp ${BUILDDIR}/debian/changelog ${BUILDDIR}/../${NAME}_${VERSION}/ cp ${BUILDDIR}/debian/changelog ${BUILDDIR}/../${NAME}_${VERSION}.changelog -- cgit v1.2.3 From dde0c674e423e5f06d1e319e3a096054607a5f72 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sun, 20 Mar 2011 19:52:53 +0100 Subject: reorganize the marker methods a bit by moving the common part to a seperate IsModeChangeOk which checks sanity and dpkg holds --- test/integration/test-bug-549968-install-depends-of-not-installed | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/integration') diff --git a/test/integration/test-bug-549968-install-depends-of-not-installed b/test/integration/test-bug-549968-install-depends-of-not-installed index 871d236b9..d5eae1ae6 100755 --- a/test/integration/test-bug-549968-install-depends-of-not-installed +++ b/test/integration/test-bug-549968-install-depends-of-not-installed @@ -17,7 +17,7 @@ setupaptarchive testequal 'Reading package lists... Building dependency tree... MarkInstall coolstuff [ i386 ] < none -> 1.0 > ( other ) FU=1 - Hold prevents MarkInstall of extracoolstuff [ i386 ] < none -> 1.0 > ( other ) FU=0 + Hold prevents MarkInstall of extracoolstuff [ i386 ] < none -> 1.0 > ( other ) Package extracoolstuff is not installed, so not removed The following NEW packages will be installed: coolstuff -- cgit v1.2.3 From dfc2b1be9e4e4b500b87df16c21ba85f59d8a587 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 23 Mar 2011 01:50:32 +0100 Subject: add a method to insert packages into dpkg's status file --- test/integration/framework | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'test/integration') diff --git a/test/integration/framework b/test/integration/framework index 4b1b98c4e..013a71ec0 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -422,6 +422,29 @@ Filename: pool/main/${NAME}/${NAME}_${VERSION}_${ARCH}.deb" >> $FILE done } +insertinstalledpackage() { + local NAME="$1" + local ARCH="$2" + local VERSION="$3" + local DEPENDENCIES="$4" + local FILE="rootdir/var/lib/dpkg/status" + echo "Package: $NAME +Status: install ok installed +Priority: optional +Section: other +Installed-Size: 42 +Maintainer: Joe Sixpack +Architecture: $ARCH +Version: $VERSION" >> $FILE + test -z "$DEPENDENCIES" || echo "$DEPENDENCIES" >> $FILE + echo "Description: an autogenerated dummy ${NAME}=${VERSION}/${RELEASE} + If you find such a package installed on your system, + YOU did something horribly wrong! They are autogenerated + und used only by testcases for APT and surf no other propose… +" >> $FILE +} + + buildaptarchivefromincoming() { msginfo "Build APT archive for ${CCMD}$(basename $0)${CINFO} based on incoming packages…" cd aptarchive -- cgit v1.2.3 From ca238ede0446483c107ace331324cbee0f096361 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 25 Mar 2011 22:12:29 +0100 Subject: * apt-pkg/cacheiterator.h: - return "all" instead of native architecture without breaking the abi (too much) by extending enum instead of using bitflags (LP: #733741) With the next abi break that enum should be a char bitflag instead --- ...est-bug-549968-install-depends-of-not-installed | 4 +-- ...g-590438-broken-provides-thanks-to-remove-order | 8 +++--- .../integration/test-bug-593360-modifiers-in-names | 16 ++++++------ .../test-bug-612099-multiarch-conflicts | 12 ++++----- test/integration/test-release-candidate-switching | 30 +++++++++++----------- 5 files changed, 35 insertions(+), 35 deletions(-) (limited to 'test/integration') diff --git a/test/integration/test-bug-549968-install-depends-of-not-installed b/test/integration/test-bug-549968-install-depends-of-not-installed index d5eae1ae6..7b4b4b71c 100755 --- a/test/integration/test-bug-549968-install-depends-of-not-installed +++ b/test/integration/test-bug-549968-install-depends-of-not-installed @@ -22,5 +22,5 @@ Package extracoolstuff is not installed, so not removed The following NEW packages will be installed: coolstuff 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. -Inst coolstuff (1.0 unstable [i386]) -Conf coolstuff (1.0 unstable [i386])' aptget install coolstuff extracoolstuff- -o Debug::pkgDepCache::Marker=1 -s +Inst coolstuff (1.0 unstable [all]) +Conf coolstuff (1.0 unstable [all])' aptget install coolstuff extracoolstuff- -o Debug::pkgDepCache::Marker=1 -s diff --git a/test/integration/test-bug-590438-broken-provides-thanks-to-remove-order b/test/integration/test-bug-590438-broken-provides-thanks-to-remove-order index 72de6eacb..0f6493948 100755 --- a/test/integration/test-bug-590438-broken-provides-thanks-to-remove-order +++ b/test/integration/test-bug-590438-broken-provides-thanks-to-remove-order @@ -62,13 +62,13 @@ predependsgawk2() { echo "$pkgbasefile Pre-Depends: $1 " >> rootdir/var/lib/dpkg/status - testequalor2 "Inst coolstuff (1-1 localhost [i386]) -Conf coolstuff (1-1 localhost [i386]) + testequalor2 "Inst coolstuff (1-1 localhost [all]) +Conf coolstuff (1-1 localhost [all]) Inst gawk2 (1:3.1.7.dfsg-5 localhost [i386]) Conf gawk2 (1:3.1.7.dfsg-5 localhost [i386]) -Remv mawk [1.3.3-15]" "Inst coolstuff (1-1 localhost [i386]) +Remv mawk [1.3.3-15]" "Inst coolstuff (1-1 localhost [all]) Inst gawk2 (1:3.1.7.dfsg-5 localhost [i386]) -Conf coolstuff (1-1 localhost [i386]) +Conf coolstuff (1-1 localhost [all]) Conf gawk2 (1:3.1.7.dfsg-5 localhost [i386]) Remv mawk [1.3.3-15]" aptget install gawk2 mawk- -sqq -o PreDepends=$(echo "$1" | sed 's/ //g') } diff --git a/test/integration/test-bug-593360-modifiers-in-names b/test/integration/test-bug-593360-modifiers-in-names index c34b499b0..83a3cfabf 100755 --- a/test/integration/test-bug-593360-modifiers-in-names +++ b/test/integration/test-bug-593360-modifiers-in-names @@ -36,29 +36,29 @@ Building dependency tree... The following NEW packages will be installed: apt 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. -Inst apt (0.8.8 localhost [i386]) -Conf apt (0.8.8 localhost [i386])' aptget install apt -s +Inst apt (0.8.8 localhost [all]) +Conf apt (0.8.8 localhost [all])' aptget install apt -s testequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: apt+ 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. -Inst apt+ (0.8.8 localhost [i386]) -Conf apt+ (0.8.8 localhost [i386])' aptget install apt+ -s +Inst apt+ (0.8.8 localhost [all]) +Conf apt+ (0.8.8 localhost [all])' aptget install apt+ -s testequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: apt+ 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. -Inst apt+ (0.8.8 localhost [i386]) -Conf apt+ (0.8.8 localhost [i386])' aptget install apt++ -s +Inst apt+ (0.8.8 localhost [all]) +Conf apt+ (0.8.8 localhost [all])' aptget install apt++ -s testequal 'Reading package lists... Building dependency tree... The following NEW packages will be installed: apt+ 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. -Inst apt+ (0.8.8 localhost [i386]) -Conf apt+ (0.8.8 localhost [i386])' aptget purge apt++ -s +Inst apt+ (0.8.8 localhost [all]) +Conf apt+ (0.8.8 localhost [all])' aptget purge apt++ -s diff --git a/test/integration/test-bug-612099-multiarch-conflicts b/test/integration/test-bug-612099-multiarch-conflicts index 6d09a4fa1..b8cfe59e2 100755 --- a/test/integration/test-bug-612099-multiarch-conflicts +++ b/test/integration/test-bug-612099-multiarch-conflicts @@ -67,9 +67,9 @@ The following NEW packages will be installed: The following packages will be upgraded: libc6 1 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. -Inst libc6 [1.0] (2.0 testing [i386]) +Inst libc6 [1.0] (2.0 testing [all]) Inst foobar (1.0 stable [i386]) -Conf libc6 (2.0 testing [i386]) +Conf libc6 (2.0 testing [all]) Conf foobar (1.0 stable [i386])' aptget install foobar/stable libc6 -st testing testequal 'Reading package lists... @@ -78,8 +78,8 @@ Reading state information... The following packages will be upgraded: libc6 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. -Inst libc6 [1.0] (2.0 testing [i386]) -Conf libc6 (2.0 testing [i386])' aptget upgrade -t testing -s +Inst libc6 [1.0] (2.0 testing [all]) +Conf libc6 (2.0 testing [all])' aptget upgrade -t testing -s aptget upgrade -y -qq 2>&1 > /dev/null testdpkginstalled libc6 @@ -171,8 +171,8 @@ Reading state information... The following packages will be upgraded: libc6-same 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. -Inst libc6-same [1.0] (2.0 testing [i386]) -Conf libc6-same (2.0 testing [i386])' aptget upgrade -t testing -s +Inst libc6-same [1.0] (2.0 testing [all]) +Conf libc6-same (2.0 testing [all])' aptget upgrade -t testing -s aptget upgrade -y -qq 2>&1 > /dev/null testdpkginstalled libc6-same diff --git a/test/integration/test-release-candidate-switching b/test/integration/test-release-candidate-switching index b79828a9e..b6dbe99db 100755 --- a/test/integration/test-release-candidate-switching +++ b/test/integration/test-release-candidate-switching @@ -95,7 +95,7 @@ E: Trivial Only specified but this is not a trivial operation." aptget install a testequal "Reading package lists... Building dependency tree... Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok' -Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-common' because of 'amarok' +Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok' Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok' The following extra packages will be installed: amarok-common (2.3.2-2+exp) @@ -117,7 +117,7 @@ E: Trivial Only specified but this is not a trivial operation." aptget install a testequal "Reading package lists... Building dependency tree... Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-null' -Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-common' because of 'amarok-null' +Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-null' Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok-null' The following extra packages will be installed: amarok-common (2.3.2-2+exp) @@ -140,7 +140,7 @@ E: Trivial Only specified but this is not a trivial operation." aptget install a testequal "Reading package lists... Building dependency tree... Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok' -Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-common' because of 'amarok' +Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok' Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok' Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-null' The following extra packages will be installed: @@ -170,7 +170,7 @@ Building dependency tree... Selected version '2.3.2-2+exp' (experimental2 [i386]) for 'amarok-less' Selected version '5:4.6.0+exp' (experimental [i386]) for 'phonon-backend-xine' because of 'amarok-less' Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-higher' -Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-common' because of 'amarok-higher' +Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-higher' Selected version '5:4.6.0+exp' (experimental [i386]) for 'phonon-backend-xine' because of 'amarok-higher' Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok-higher' The following extra packages will be installed: @@ -195,7 +195,7 @@ E: Trivial Only specified but this is not a trivial operation." aptget install a testequal "Reading package lists... Building dependency tree... Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-null2' -Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-common' because of 'amarok-null2' +Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-null2' Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok-null2' The following extra packages will be installed: amarok-common (2.3.2-2+exp) @@ -218,7 +218,7 @@ E: Trivial Only specified but this is not a trivial operation." aptget install a testequal "Reading package lists... Building dependency tree... Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-xine' -Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-common' because of 'amarok-xine' +Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-xine' Selected version '5:4.6.0+exp' (experimental [i386]) for 'phonon-backend-xine' because of 'amarok-xine' Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok-xine' The following extra packages will be installed: @@ -242,7 +242,7 @@ E: Trivial Only specified but this is not a trivial operation." aptget install a testequal "Reading package lists... Building dependency tree... Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-xine2' -Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-common' because of 'amarok-xine2' +Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-xine2' Selected version '5:4.20.0+exp' (experimental [i386]) for 'phonon-backend-null' because of 'amarok-xine2' Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok-xine2' The following extra packages will be installed: @@ -266,9 +266,9 @@ E: Trivial Only specified but this is not a trivial operation." aptget install a testequal "Reading package lists... Building dependency tree... Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-xine3' -Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-common' because of 'amarok-xine3' +Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-xine3' Selected version '5:4.6.0+exp' (experimental [i386]) for 'phonon-backend-xine3' because of 'amarok-xine3' -Selected version '2.0' (experimental [i386]) for 'intermediatepkg' because of 'phonon-backend-xine3' +Selected version '2.0' (experimental [all]) for 'intermediatepkg' because of 'phonon-backend-xine3' Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok-xine3' The following extra packages will be installed: amarok-common (2.3.2-2+exp) @@ -293,7 +293,7 @@ E: Trivial Only specified but this is not a trivial operation." aptget install a testequal "Reading package lists... Building dependency tree... Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-xine4' -Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-common' because of 'amarok-xine4' +Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-xine4' Selected version '5:4.20.0+exp' (experimental [i386]) for 'phonon-backend-null' because of 'amarok-xine4' Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok-xine4' The following extra packages will be installed: @@ -317,7 +317,7 @@ E: Trivial Only specified but this is not a trivial operation." aptget install a testequal "Reading package lists... Building dependency tree... Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-broken' -Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-common' because of 'amarok-broken' +Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-broken' Selected version '5:4.20.0+exp' (experimental [i386]) for 'phonon-backend-null' because of 'amarok-broken' Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok-broken' The following extra packages will be installed: @@ -341,7 +341,7 @@ E: Trivial Only specified but this is not a trivial operation." aptget install a testequal "Reading package lists... Building dependency tree... Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-recommends' -Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-common' because of 'amarok-recommends' +Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-recommends' Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-utils' because of 'amarok-recommends' The following extra packages will be installed: amarok-common (2.3.2-2+exp) @@ -364,7 +364,7 @@ E: Trivial Only specified but this is not a trivial operation." aptget install a testequal "Reading package lists... Building dependency tree... Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-recommends' -Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-common' because of 'amarok-recommends' +Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-recommends' The following extra packages will be installed: amarok-common (2.3.2-2+exp) Recommended packages: @@ -385,7 +385,7 @@ E: Trivial Only specified but this is not a trivial operation." aptget install a testequal "Reading package lists... Building dependency tree... Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-recommends2' -Selected version '2.3.2-2+exp' (experimental [i386]) for 'amarok-common' because of 'amarok-recommends2' +Selected version '2.3.2-2+exp' (experimental [all]) for 'amarok-common' because of 'amarok-recommends2' The following extra packages will be installed: amarok-common (2.3.2-2+exp) libc6 (2.11.2-7+sid) @@ -406,7 +406,7 @@ E: Trivial Only specified but this is not a trivial operation." aptget install a # if one depends doesn't work, we don't need to look deeper… testequal "Reading package lists... Building dependency tree... -Selected version '1.0' (experimental [i386]) for 'uninstallablepkg' +Selected version '1.0' (experimental [all]) for 'uninstallablepkg' Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created -- cgit v1.2.3 From 8aec002f1d3eb70423c760a68a9825a92bba7b2a Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 26 Mar 2011 01:31:32 +0100 Subject: * apt-pkg/aptconfiguration.cc: - use dpkg --print-foreign-architectures to get multiarch configuration if non is specified with APT::Architectures (Closes: #612958) --- .../test-bug-612958-use-dpkg-multiarch-config | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100755 test/integration/test-bug-612958-use-dpkg-multiarch-config (limited to 'test/integration') diff --git a/test/integration/test-bug-612958-use-dpkg-multiarch-config b/test/integration/test-bug-612958-use-dpkg-multiarch-config new file mode 100755 index 000000000..4f31c3953 --- /dev/null +++ b/test/integration/test-bug-612958-use-dpkg-multiarch-config @@ -0,0 +1,59 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'i386' +setupaptarchive + +insertinstalledpackage 'libapt' 'i386' '1.0' +insertinstalledpackage 'libapt' 'amd64' '1.0' +insertinstalledpackage 'libapt' 'armel' '1.0' + +testpass() { + rm rootdir/var/cache/apt/*.bin + msgtest 'Test architecture handling' "$1 with $2" + aptcache show libapt:$2 2> /dev/null > /dev/null && msgpass || msgfail +} + +testfail() { + rm rootdir/var/cache/apt/*.bin + msgtest 'Test architecture handling' "$1 with $2" + aptcache show libapt:$2 2> /dev/null > /dev/null && msgfail || msgpass +} + +testpass 'no config' 'i386' +testfail 'no config' 'amd64' +testfail 'no config' 'armel' + +CONFFILE=rootdir/etc/apt/apt.conf.d/99multiarch +echo '#clear APT::Architectures;' >> $CONFFILE +echo 'APT::Architectures:: "i386";' >> $CONFFILE +echo 'APT::Architectures:: "amd64";' >> $CONFFILE + +testpass 'apt config' 'i386' +testpass 'apt config' 'amd64' +testfail 'apt config' 'armel' + +echo 'APT::Architectures:: "armel";' >> $CONFFILE + +testpass 'apt config' 'armel' + +rm $CONFFILE + +echo '#clear APT::Architectures;' >> $CONFFILE +echo 'Dir::Bin::dpkg "./dpkg-printer";' >> $CONFFILE + +echo '#! /bin/sh +echo "amd64"' > ./dpkg-printer +chmod +x ./dpkg-printer + +testpass 'dpkg config' 'i386' +testpass 'dpkg config' 'amd64' +testfail 'dpkg config' 'armel' + +echo '#! /bin/sh +echo "amd64 armel"' > ./dpkg-printer + +testpass 'dpkg config' 'armel' -- cgit v1.2.3 From cc26da01ef43686d67959ef080e5492410d20e4e Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 26 Mar 2011 12:41:51 +0100 Subject: do not change protected packages in autoinstall (Closes: #618848) --- ...est-bug-549968-install-depends-of-not-installed | 2 +- .../test-bug-618848-always-respect-user-requests | 32 ++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100755 test/integration/test-bug-618848-always-respect-user-requests (limited to 'test/integration') diff --git a/test/integration/test-bug-549968-install-depends-of-not-installed b/test/integration/test-bug-549968-install-depends-of-not-installed index 7b4b4b71c..78c0801f2 100755 --- a/test/integration/test-bug-549968-install-depends-of-not-installed +++ b/test/integration/test-bug-549968-install-depends-of-not-installed @@ -17,7 +17,7 @@ setupaptarchive testequal 'Reading package lists... Building dependency tree... MarkInstall coolstuff [ i386 ] < none -> 1.0 > ( other ) FU=1 - Hold prevents MarkInstall of extracoolstuff [ i386 ] < none -> 1.0 > ( other ) + Ignore MarkInstall of extracoolstuff [ i386 ] < none -> 1.0 > ( other ) as its mode (Keep) is protected Package extracoolstuff is not installed, so not removed The following NEW packages will be installed: coolstuff diff --git a/test/integration/test-bug-618848-always-respect-user-requests b/test/integration/test-bug-618848-always-respect-user-requests new file mode 100755 index 000000000..5148be640 --- /dev/null +++ b/test/integration/test-bug-618848-always-respect-user-requests @@ -0,0 +1,32 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'i386' + +insertinstalledpackage 'libdb4.8' 'all' '1.0' +insertinstalledpackage 'exim4' 'all' '1.0' 'Depends: exim4-daemon-light | exim4-daemon-heavy' +insertinstalledpackage 'exim4-daemon-light' 'all' '1.0' 'Depends: libdb4.8' +insertpackage 'unstable' 'exim4-daemon-heavy' 'all' '1.0' 'Depends: libdb4.8' + +setupaptarchive + +testequal 'Reading package lists... +Building dependency tree... + MarkDelete libdb4.8 [ i386 ] < 1.0 > ( other ) FU=1 + MarkDelete exim4-daemon-light [ i386 ] < 1.0 > ( other ) FU=1 + MarkInstall exim4-daemon-heavy [ i386 ] < none -> 1.0 > ( other ) FU=0 + Ignore MarkInstall of libdb4.8 [ i386 ] < 1.0 > ( other ) as its mode (Delete) is protected + MarkDelete exim4-daemon-heavy [ i386 ] < none -> 1.0 > ( other ) FU=0 + MarkDelete exim4 [ i386 ] < 1.0 > ( other ) FU=1 +The following packages will be REMOVED: + exim4 exim4-daemon-light libdb4.8 + MarkDelete exim4 [ i386 ] < 1.0 > ( other ) FU=1 +0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded. +Remv exim4 [1.0] + MarkDelete exim4-daemon-light [ i386 ] < 1.0 > ( other ) FU=1 +Remv exim4-daemon-light [1.0] + MarkDelete libdb4.8 [ i386 ] < 1.0 > ( other ) FU=1 +Remv libdb4.8 [1.0]' aptget remove libdb4.8 -s -o Debug::pkgDepCache::Marker=1 -- cgit v1.2.3