From d67004e086fbe52a15a61812964614e9982428b6 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 15 Apr 2011 22:04:48 +0200 Subject: be able to set priorities for created test packages --- test/integration/framework | 51 +++++++++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 21 deletions(-) (limited to 'test') diff --git a/test/integration/framework b/test/integration/framework index 013a71ec0..b0ea7a5c0 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -218,6 +218,7 @@ buildsimplenativepackage() { local DEPENDENCIES="$5" local DESCRIPTION="$6" local SECTION="${7:-others}" + local PRIORITY="${8:-optional}" local DISTSECTION if [ "$SECTION" = "$(echo "$SECTION" | cut -d'/' -f 2)" ]; then DISTSECTION="main" @@ -240,7 +241,7 @@ echo '$NAME says \"Hello!\"'" > ${BUILDDIR}/${NAME} -- Joe Sixpack $(date -R)" > ${BUILDDIR}/debian/changelog echo "Source: $NAME Section: $SECTION -Priority: optional +Priority: $PRIORITY Maintainer: Joe Sixpack Standards-Version: 3.9.1 @@ -396,29 +397,34 @@ insertpackage() { local ARCH="$3" local VERSION="$4" local DEPENDENCIES="$5" - local ARCHS="$ARCH" - if [ "$ARCHS" = "all" ]; then - ARCHS="$(aptconfig dump | grep APT::Architecture | cut -d'"' -f 2 | sed '/^$/ d' | sort | uniq | tr '\n' ' ')" - fi - for BUILDARCH in $ARCHS; do - local PPATH="aptarchive/dists/${RELEASE}/main/binary-${BUILDARCH}" - mkdir -p $PPATH aptarchive/dists/${RELEASE}/main/source - touch aptarchive/dists/${RELEASE}/main/source/Sources - local FILE="${PPATH}/Packages" - echo "Package: $NAME -Priority: optional + local PRIORITY="${6:-optional}" + local ARCHS="" + for arch in $(echo "$ARCH" | sed -e 's#,#\n#g'); do + if [ "$arch" = "all" ]; then + ARCHS="$(aptconfig dump | grep APT::Architecture | cut -d'"' -f 2 | sed '/^$/ d' | sort | uniq | tr '\n' ' ')" + else + ARCHS="$arch" + fi + for BUILDARCH in $ARCHS; do + local PPATH="aptarchive/dists/${RELEASE}/main/binary-${BUILDARCH}" + mkdir -p $PPATH aptarchive/dists/${RELEASE}/main/source + touch aptarchive/dists/${RELEASE}/main/source/Sources + local FILE="${PPATH}/Packages" + echo "Package: $NAME +Priority: $PRIORITY Section: other Installed-Size: 42 Maintainer: Joe Sixpack -Architecture: $ARCH +Architecture: $arch Version: $VERSION -Filename: pool/main/${NAME}/${NAME}_${VERSION}_${ARCH}.deb" >> $FILE - test -z "$DEPENDENCIES" || echo "$DEPENDENCIES" >> $FILE - echo "Description: an autogenerated dummy ${NAME}=${VERSION}/${RELEASE} +Filename: pool/main/${NAME}/${NAME}_${VERSION}_${arch}.deb" >> $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 + done done } @@ -427,21 +433,24 @@ insertinstalledpackage() { local ARCH="$2" local VERSION="$3" local DEPENDENCIES="$4" + local PRIORITY="${5:-optional}" local FILE="rootdir/var/lib/dpkg/status" - echo "Package: $NAME + for arch in $(echo "$ARCH" | sed -e 's#,#\n#g'); do + echo "Package: $NAME Status: install ok installed -Priority: optional +Priority: $PRIORITY Section: other Installed-Size: 42 Maintainer: Joe Sixpack -Architecture: $ARCH +Architecture: $arch Version: $VERSION" >> $FILE - test -z "$DEPENDENCIES" || echo "$DEPENDENCIES" >> $FILE - echo "Description: an autogenerated dummy ${NAME}=${VERSION}/${RELEASE} + test -z "$DEPENDENCIES" || echo "$DEPENDENCIES" >> $FILE + echo "Description: an autogenerated dummy ${NAME}=${VERSION}/installed 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 + done } -- cgit v1.2.3 From 7f52cf7b027e36367b7f13e2e8a1309485827611 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 15 Apr 2011 22:05:34 +0200 Subject: add sbin directories to PATH to avoid dpkg warnings --- test/integration/framework | 1 + 1 file changed, 1 insertion(+) (limited to 'test') diff --git a/test/integration/framework b/test/integration/framework index b0ea7a5c0..50c5157e9 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -145,6 +145,7 @@ setupenvironment() { echo "DPKG::options:: \"--log=${TMPWORKINGDIRECTORY}/rootdir/var/log/dpkg.log\";" >> aptconfig.conf echo 'quiet::NoUpdate "true";' >> aptconfig.conf export LC_ALL=C + export PATH="${PATH}:/usr/local/sbin:/usr/sbin:/sbin" msgdone "info" } -- cgit v1.2.3 From 949e033cb7c741b9eed459c0e93a89a92acb168d Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 16 Apr 2011 00:06:34 +0200 Subject: =?UTF-8?q?*=20apt-pkg/depcache.cc:=20=20=20-=20really=20include?= =?UTF-8?q?=20'rc'=20packages=20in=20the=20delete=20count=20by=20fixing=20?= =?UTF-8?q?a=20=20=20=20=20typo=20which=20exists=20since=201999=20in=20the?= =?UTF-8?q?=20source=E2=80=A6=20(LP:=20#761175)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../test-ubuntu-bug-761175-remove-purge | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100755 test/integration/test-ubuntu-bug-761175-remove-purge (limited to 'test') diff --git a/test/integration/test-ubuntu-bug-761175-remove-purge b/test/integration/test-ubuntu-bug-761175-remove-purge new file mode 100755 index 000000000..93b67fc02 --- /dev/null +++ b/test/integration/test-ubuntu-bug-761175-remove-purge @@ -0,0 +1,38 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'i386' + +setupsimplenativepackage 'compiz-core' 'i386' '1.0' 'unstable' +BUILDDIR='incoming/compiz-core-1.0' +mkdir -p ${BUILDDIR}/debian/compiz-core/etc +echo 'foo=bar;' > ${BUILDDIR}/compiz.conf +echo 'compiz.conf /etc/compiz.conf' >> ${BUILDDIR}/debian/install +buildpackage "$BUILDDIR" 'unstable' 'main' +rm -rf "$BUILDDIR" + +setupaptarchive + + +testdpkgnotinstalled compiz-core +msgtest 'Install package' 'compiz-core' +aptget install compiz-core -qq 2>&1 >/dev/null && msgpass || msgfail +testdpkginstalled compiz-core + +msgtest 'Remove package' 'compiz-core' +aptget remove compiz-core -y -qq 2>&1 >/dev/null && msgpass || msgfail +testdpkgnotinstalled compiz-core + +msgtest 'Check that conffiles are still around for' 'compiz-core' +dpkg -l compiz-core | grep '^rc' 2>&1 >/dev/null && msgpass || msgfail + +testequal 'Reading package lists... +Building dependency tree... +Reading state information... +The following packages will be REMOVED: + compiz-core* +0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. +Purg compiz-core' aptget purge compiz-core -s -- cgit v1.2.3 From 6070a3461841d4398d731fcb33792d55779111f1 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 16 Apr 2011 01:10:09 +0200 Subject: fix a bunch of cppcheck warnings/errors based on a patch by Niels Thykier, thanks! (Closes: #622805) --- test/testextract.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/testextract.cc b/test/testextract.cc index 1c738aab9..b790df618 100644 --- a/test/testextract.cc +++ b/test/testextract.cc @@ -71,9 +71,12 @@ bool Go(int argc,char *argv[]) Itm.Type = pkgDirStream::Item::Directory; int Fd; - if (Extract.DoItem(Itm,Fd) == false) + if (Extract.DoItem(Itm,Fd) == false) { + fclose(F); return false; - } + } + } + fclose(F); } else if (Deb.ExtractArchive(Extract) == false) -- cgit v1.2.3 From e1a279fb9b1580d69f5aac5d2c7191eb6ee59947 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 21 Apr 2011 16:41:07 +0200 Subject: remove not existing packages left over from the testcase --- test/integration/test-bug-612557-garbage-upgrade | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/integration/test-bug-612557-garbage-upgrade b/test/integration/test-bug-612557-garbage-upgrade index 3112e618c..8efd1687a 100755 --- a/test/integration/test-bug-612557-garbage-upgrade +++ b/test/integration/test-bug-612557-garbage-upgrade @@ -13,9 +13,9 @@ insertpackage 'unstable' 'libreoffice-common' 'all' '1:3.3.0-2' 'Conflicts: open setupaptarchive touch rootdir/var/lib/apt/extended_states -aptmark markauto python-uno ure uno-libs3 openoffice.org-common openoffice.org-style-galaxy +aptmark markauto python-uno openoffice.org-common #aptmark unmarkauto openoffice.org-emailmerge -testmarkedauto python-uno ure uno-libs3 openoffice.org-common openoffice.org-style-galaxy +testmarkedauto python-uno openoffice.org-common testequal 'Reading package lists... Building dependency tree... @@ -33,7 +33,7 @@ After this operation, 53.2 MB disk space will be freed. E: Trivial Only specified but this is not a trivial operation.' aptget --trivial-only install python-uno aptmark markauto openoffice.org-emailmerge -testmarkedauto python-uno ure uno-libs3 openoffice.org-common openoffice.org-style-galaxy openoffice.org-emailmerge +testmarkedauto python-uno openoffice.org-common openoffice.org-emailmerge testequal 'Reading package lists... Building dependency tree... -- cgit v1.2.3 From c98fb5e00d4b8a7e0c372e9cbc857046dec3b3dd Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 21 Apr 2011 16:46:28 +0200 Subject: * cmdline/apt-mark.cc: - reimplement apt-mark in c++ --- test/integration/framework | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/integration/framework b/test/integration/framework index 50c5157e9..b257738e7 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -695,7 +695,7 @@ testmarkedauto() { while [ -n "$1" ]; do echo "$1"; shift; done | sort > $COMPAREFILE else msgtest 'Test for correctly marked as auto-installed' 'no package' - echo > $COMPAREFILE + echo -n > $COMPAREFILE fi aptmark showauto 2>&1 | checkdiff $COMPAREFILE - && msgpass || msgfail } -- cgit v1.2.3 From 7f24da09a135c4ec079e9ede7b3dc294b1baac37 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 26 Apr 2011 19:30:21 +0200 Subject: * test/versions.lst: - disable obscure version number tests with versions dpkg doesn't allow any more as they don't start with a number --- test/versions.lst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test') diff --git a/test/versions.lst b/test/versions.lst index 2d0967645..8dd8ebdc9 100644 --- a/test/versions.lst +++ b/test/versions.lst @@ -10,13 +10,16 @@ 1.3 1.2.2 1 # Important attributes -# disabled as dpkg --compare-versions doesn't like them… +# disabled as dpkg --compare-versions doesn't like them… (versions have to start with a number) #- . -1 #p - -1 #a - -1 #z - -1 -a . -1 -z . -1 +#a . -1 +#z . -1 + +# disabled as dpkg --compare-versions doesn't like them… (versions have to start with a number) +#III-alpha9.8 III-alpha9.8-1.5 -1 # Epochs 1:0.4 10.3 1 @@ -49,9 +52,6 @@ z . -1 1:3.0.5-2 1:3.0.5.1 -1 -# #194327 -III-alpha9.8 III-alpha9.8-1.5 -1 - # #205960 3.0~rc1-1 3.0-1 -1 -- cgit v1.2.3 From c5bcc6074c1e0f9881529709a8489cccb674a3d4 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 27 Apr 2011 14:38:48 +0200 Subject: support lighttpd as test webserver but still prefer weborf --- test/integration/framework | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'test') diff --git a/test/integration/framework b/test/integration/framework index b257738e7..cc5af798c 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -573,13 +573,22 @@ changetowebserver() { if which weborf > /dev/null; then weborf -xb aptarchive/ 2>&1 > /dev/null & addtrap "kill $!;" - local APTARCHIVE="file://$(readlink -f ./aptarchive)" - for LIST in $(find rootdir/etc/apt/sources.list.d/ -name 'apt-test-*.list'); do - sed -i $LIST -e "s#$APTARCHIVE#http://localhost:8080/#" - done - return 0 + elif which lighttpd > /dev/null; then + echo "server.document-root = \"$(readlink -f ./aptarchive)\" +server.port = 8080 +server.stat-cache-engine = \"disable\"" > lighttpd.conf + lighttpd -t -f lighttpd.conf >/dev/null || msgdie 'Can not change to webserver: our lighttpd config is invalid' + lighttpd -D -f lighttpd.conf 2>/dev/null >/dev/null & + addtrap "kill $!;" + else + msgdie 'You have to install weborf or lighttpd first' + return 1 fi - return 1 + local APTARCHIVE="file://$(readlink -f ./aptarchive)" + for LIST in $(find rootdir/etc/apt/sources.list.d/ -name 'apt-test-*.list'); do + sed -i $LIST -e "s#$APTARCHIVE#http://localhost:8080/#" + done + return 0 } checkdiff() { -- cgit v1.2.3 From c34ea12ad509cb34c954ed574a301c3cbede55ec Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 10 May 2011 15:49:25 +0200 Subject: dequote URL taken from Location in redirects as we will otherwise quote an already quoted string in the request later (Closes: #602412) --- test/integration/skip-bug-602412-dequote-redirect | 36 +++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 test/integration/skip-bug-602412-dequote-redirect (limited to 'test') diff --git a/test/integration/skip-bug-602412-dequote-redirect b/test/integration/skip-bug-602412-dequote-redirect new file mode 100755 index 000000000..a63d36246 --- /dev/null +++ b/test/integration/skip-bug-602412-dequote-redirect @@ -0,0 +1,36 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'i386' + +if ! which lighttpd > /dev/null; then + msgdie 'You need lighttpd for this testcase, sorry…' + exit 1 +fi + +buildsimplenativepackage 'unrelated' 'all' '0.5~squeeze1' 'unstable' + +setupaptarchive + +echo "server.modules = ( \"mod_redirect\" ) +server.document-root = \"$(readlink -f ./aptarchive)\" +server.port = 8080 +server.stat-cache-engine = \"disable\" +url.redirect = ( \"^/pool/(.*)$\" => \"/newpool/\$1\" )" > lighttpd.conf + +mv aptarchive/pool aptarchive/newpool +lighttpd -t -f lighttpd.conf >/dev/null || msgdie 'Can not change to webserver: our lighttpd config is invalid' +lighttpd -D -f lighttpd.conf 2>/dev/null >/dev/null & +addtrap "kill $!;" + +local APTARCHIVE="file://$(readlink -f ./aptarchive)" +for LIST in $(find rootdir/etc/apt/sources.list.d/ -name 'apt-test-*.list'); do + sed -i $LIST -e "s#$APTARCHIVE#http://localhost:8080/#" +done + +aptget update -qq || msgdie 'apt-get update failed' +aptget install unrelated --download-only -qq || msgdie 'downloading package failed' + -- cgit v1.2.3 From df77d8a5fb5340b23fec5363f9a52704e940b048 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 11 May 2011 14:09:18 +0200 Subject: if critical or-group can't be satisfied, exit directly. --- test/integration/test-handling-broken-orgroups | 108 +++++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100755 test/integration/test-handling-broken-orgroups (limited to 'test') diff --git a/test/integration/test-handling-broken-orgroups b/test/integration/test-handling-broken-orgroups new file mode 100755 index 000000000..d88ad0000 --- /dev/null +++ b/test/integration/test-handling-broken-orgroups @@ -0,0 +1,108 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'i386' + +insertpackage 'unstable' 'cool' 'all' '1.0-1' +insertpackage 'unstable' 'stuff' 'all' '1.0-1' +insertpackage 'unstable' 'coolstuff' 'all' '1.0-1' 'Depends: cool | stuff' +insertpackage 'unstable' 'coolstuff2' 'all' '1.0-1' 'Depends: cool2 | stuff' +insertpackage 'unstable' 'coolstuff-broken' 'all' '1.0-1' 'Depends: cool2 | stuff2' +insertpackage 'unstable' 'coolstuff-brokenrec' 'all' '1.0-1' 'Recommends: cool2 | stuff2' +insertpackage 'unstable' 'coolstuff-conflict' 'all' '1.0-1' 'Depends: cool | stuff +Conflicts: cool' +insertpackage 'unstable' 'coolstuff-provided' 'all' '1.0-1' 'Depends: cool2 | stuff-abi' +insertpackage 'unstable' 'extrastuff' 'all' '1.0-1' 'Provides: stuff-abi' + +insertpackage 'unstable' 'coolstuff-provided-broken' 'all' '1.0-1' 'Depends: cool2 | stuff-abi-2' +insertpackage 'unstable' 'extrastuff' 'all' '1.0-1' 'Depends: stuff2 +Provides: stuff-abi-2' + +setupaptarchive + +testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + cool +The following NEW packages will be installed: + cool coolstuff +0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. +Inst cool (1.0-1 unstable [all]) +Inst coolstuff (1.0-1 unstable [all]) +Conf cool (1.0-1 unstable [all]) +Conf coolstuff (1.0-1 unstable [all])' aptget install coolstuff -s + +testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + stuff +The following NEW packages will be installed: + coolstuff2 stuff +0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. +Inst stuff (1.0-1 unstable [all]) +Inst coolstuff2 (1.0-1 unstable [all]) +Conf stuff (1.0-1 unstable [all]) +Conf coolstuff2 (1.0-1 unstable [all])' aptget install coolstuff2 -s + +testequal 'Reading package lists... +Building dependency tree... +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 +or been moved out of Incoming. +The following information may help to resolve the situation: + +The following packages have unmet dependencies: + coolstuff-broken : Depends: cool2 but it is not installable or + stuff2 but it is not installable +E: Broken packages' aptget install coolstuff-broken -s + +testequal 'Reading package lists... +Building dependency tree... +Recommended packages: + cool2 stuff2 +The following NEW packages will be installed: + coolstuff-brokenrec +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst coolstuff-brokenrec (1.0-1 unstable [all]) +Conf coolstuff-brokenrec (1.0-1 unstable [all])' aptget install coolstuff-brokenrec -s + +testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + stuff +The following NEW packages will be installed: + coolstuff-conflict stuff +0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. +Inst stuff (1.0-1 unstable [all]) +Inst coolstuff-conflict (1.0-1 unstable [all]) +Conf stuff (1.0-1 unstable [all]) +Conf coolstuff-conflict (1.0-1 unstable [all])' aptget install coolstuff-conflict -s + +testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + extrastuff +The following NEW packages will be installed: + coolstuff-provided extrastuff +0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. +Inst extrastuff (1.0-1 unstable [all]) +Inst coolstuff-provided (1.0-1 unstable [all]) +Conf extrastuff (1.0-1 unstable [all]) +Conf coolstuff-provided (1.0-1 unstable [all])' aptget install coolstuff-provided -s + +testequal 'Reading package lists... +Building dependency tree... +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 +or been moved out of Incoming. +The following information may help to resolve the situation: + +The following packages have unmet dependencies: + coolstuff-provided-broken : Depends: cool2 but it is not installable or + stuff-abi-2 +E: Broken packages' aptget install coolstuff-provided-broken -s -- cgit v1.2.3 From 6ed085162423d0c3f1b7f432af1226d59654afbd Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 13 May 2011 00:07:22 +0200 Subject: rewrite new and previously satisfied important dependency detection in MarkInstall to be a bit more easy to read and possibily a bit faster - and add a small testcase for these situations to ensure the same behaviour --- .../test-bug-470115-new-and-tighten-recommends | 172 +++++++++++++++++++++ 1 file changed, 172 insertions(+) create mode 100755 test/integration/test-bug-470115-new-and-tighten-recommends (limited to 'test') diff --git a/test/integration/test-bug-470115-new-and-tighten-recommends b/test/integration/test-bug-470115-new-and-tighten-recommends new file mode 100755 index 000000000..6bc22ea7b --- /dev/null +++ b/test/integration/test-bug-470115-new-and-tighten-recommends @@ -0,0 +1,172 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'i386' + +insertinstalledpackage 'cool' 'all' '1' +insertinstalledpackage 'stuff' 'all' '1' +insertinstalledpackage 'coolstuff' 'all' '1' + +insertpackage 'unstable' 'cool' 'all' '2' +insertpackage 'unstable' 'stuff' 'all' '2' +insertpackage 'unstable' 'coolstuff' 'all' '2' +insertpackage 'unstable' 'super' 'all' '2' + +insertinstalledpackage 'tighten-cool' 'all' '1' 'Recommends: cool (>= 1)' +insertpackage 'unstable' 'tighten-cool' 'all' '2' 'Recommends: cool (>= 2)' + +insertinstalledpackage 'tighten-coolorstuff' 'all' '1' 'Recommends: cool (>= 1) | stuff (>= 1)' +insertpackage 'unstable' 'tighten-coolorstuff' 'all' '2' 'Recommends: stuff (>= 2) | cool (>= 2)' + +insertinstalledpackage 'tighten-coolorstuff2' 'all' '1' 'Recommends: cool (>= 1) | stuff (>= 1)' +insertpackage 'unstable' 'tighten-coolorstuff2' 'all' '2' 'Recommends: stuff2 (>= 2) | cool (>= 2)' + +insertinstalledpackage 'newrec-cool' 'all' '1' +insertpackage 'unstable' 'newrec-cool' 'all' '2' 'Recommends: cool (>= 2)' + +insertinstalledpackage 'newrec-super' 'all' '1' +insertpackage 'unstable' 'newrec-super' 'all' '2' 'Recommends: super' + +insertinstalledpackage 'newrec-coolorstuff' 'all' '1' +insertpackage 'unstable' 'newrec-coolorstuff' 'all' '2' 'Recommends: cool (>= 2) | stuff (>= 2)' + +insertinstalledpackage 'cool-gone' 'all' '1' 'Recommends: cool (>= 1) | stuff (>= 2)' +insertpackage 'unstable' 'cool-gone' 'all' '2' 'Recommends: stuff (>= 2)' + +insertinstalledpackage 'super-overtake' 'all' '1' 'Recommends: cool | super, stuff | super' +insertpackage 'unstable' 'super-overtake' 'all' '2' 'Recommends: stuff (>= 3) | super, super | cool (>= 2)' + +insertinstalledpackage 'upgrade-over-new' 'all' '1' 'Recommends: cool' +insertpackage 'unstable' 'upgrade-over-new' 'all' '2' 'Recommends: cool (>= 2) | super' + +insertinstalledpackage 'now-satisfiable' 'all' '1' 'Recommends: cool (>= 3)' +insertpackage 'unstable' 'now-satisfiable' 'all' '2' 'Recommends: cool (>= 2)' + +setupaptarchive + +testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + cool +The following packages will be upgraded: + cool tighten-cool +2 upgraded, 0 newly installed, 0 to remove and 11 not upgraded. +Inst cool [1] (2 unstable [all]) +Inst tighten-cool [1] (2 unstable [all]) +Conf cool (2 unstable [all]) +Conf tighten-cool (2 unstable [all])' aptget install tighten-cool -s + +testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + stuff +The following packages will be upgraded: + stuff tighten-coolorstuff +2 upgraded, 0 newly installed, 0 to remove and 11 not upgraded. +Inst stuff [1] (2 unstable [all]) +Inst tighten-coolorstuff [1] (2 unstable [all]) +Conf stuff (2 unstable [all]) +Conf tighten-coolorstuff (2 unstable [all])' aptget install tighten-coolorstuff -s + +testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + cool +The following packages will be upgraded: + cool tighten-coolorstuff2 +2 upgraded, 0 newly installed, 0 to remove and 11 not upgraded. +Inst cool [1] (2 unstable [all]) +Inst tighten-coolorstuff2 [1] (2 unstable [all]) +Conf cool (2 unstable [all]) +Conf tighten-coolorstuff2 (2 unstable [all])' aptget install tighten-coolorstuff2 -s + +testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + cool +The following packages will be upgraded: + cool newrec-cool +2 upgraded, 0 newly installed, 0 to remove and 11 not upgraded. +Inst cool [1] (2 unstable [all]) +Inst newrec-cool [1] (2 unstable [all]) +Conf cool (2 unstable [all]) +Conf newrec-cool (2 unstable [all])' aptget install newrec-cool -s + +testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + super +The following NEW packages will be installed: + super +The following packages will be upgraded: + newrec-super +1 upgraded, 1 newly installed, 0 to remove and 12 not upgraded. +Inst newrec-super [1] (2 unstable [all]) +Inst super (2 unstable [all]) +Conf newrec-super (2 unstable [all]) +Conf super (2 unstable [all])' aptget install newrec-super -s + +testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + cool +The following packages will be upgraded: + cool newrec-coolorstuff +2 upgraded, 0 newly installed, 0 to remove and 11 not upgraded. +Inst cool [1] (2 unstable [all]) +Inst newrec-coolorstuff [1] (2 unstable [all]) +Conf cool (2 unstable [all]) +Conf newrec-coolorstuff (2 unstable [all])' aptget install newrec-coolorstuff -s + +testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + stuff +The following packages will be upgraded: + cool-gone stuff +2 upgraded, 0 newly installed, 0 to remove and 11 not upgraded. +Inst cool-gone [1] (2 unstable [all]) +Inst stuff [1] (2 unstable [all]) +Conf cool-gone (2 unstable [all]) +Conf stuff (2 unstable [all])' aptget install cool-gone -s + +testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + super +The following NEW packages will be installed: + super +The following packages will be upgraded: + super-overtake +1 upgraded, 1 newly installed, 0 to remove and 12 not upgraded. +Inst super (2 unstable [all]) +Inst super-overtake [1] (2 unstable [all]) +Conf super (2 unstable [all]) +Conf super-overtake (2 unstable [all])' aptget install super-overtake -s + +# if super would be in front, we would get a new here as it is new and +# the first option in an or-group should be the preferred one… +testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + cool +The following packages will be upgraded: + cool upgrade-over-new +2 upgraded, 0 newly installed, 0 to remove and 11 not upgraded. +Inst cool [1] (2 unstable [all]) +Inst upgrade-over-new [1] (2 unstable [all]) +Conf cool (2 unstable [all]) +Conf upgrade-over-new (2 unstable [all])' aptget install upgrade-over-new -s + +# the recommends wasn't used before so while we could do it now, +# the user doesn't seem to need it so avoid upgrading it +testequal 'Reading package lists... +Building dependency tree... +The following packages will be upgraded: + now-satisfiable +1 upgraded, 0 newly installed, 0 to remove and 12 not upgraded. +Inst now-satisfiable [1] (2 unstable [all]) +Conf now-satisfiable (2 unstable [all])' aptget install now-satisfiable -s -- cgit v1.2.3 From d77b985a309c379d4978525172a72b728fecd15e Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 16 May 2011 11:41:43 +0200 Subject: * apt-pkg/packagemanager.cc: - ensure for Multi-Arch:same packages that they are unpacked in lock step even in immediate configuration (Closes: #618288) --- .../test-bug-618288-multiarch-same-lockstep | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 test/integration/test-bug-618288-multiarch-same-lockstep (limited to 'test') diff --git a/test/integration/test-bug-618288-multiarch-same-lockstep b/test/integration/test-bug-618288-multiarch-same-lockstep new file mode 100755 index 000000000..7e384e428 --- /dev/null +++ b/test/integration/test-bug-618288-multiarch-same-lockstep @@ -0,0 +1,32 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'amd64' 'i386' + +insertinstalledpackage 'libsame' 'i386,amd64' '1' 'Multi-Arch: same' 'required' +insertinstalledpackage 'apt' 'i386' '1' 'Depends: libsame (= 1) +Essential: yes' 'required' +insertinstalledpackage 'apt2' 'amd64' '1' 'Depends: libsame (= 1) +Essential: yes' 'required' +buildsimplenativepackage 'libsame' 'i386,amd64' '2' 'unstable' 'Multi-Arch: same' '' 'required' +buildsimplenativepackage 'apt' 'i386' '2' 'unstable' 'Depends: libsame (= 2)' '' 'required' +buildsimplenativepackage 'apt2' 'amd64' '2' 'unstable' 'Depends: libsame (= 2)' '' 'required' + +setupaptarchive + +testequal 'Reading package lists... +Building dependency tree... +The following packages will be upgraded: + apt:i386 apt2 libsame libsame:i386 +4 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. +Inst libsame [1] (2 unstable [amd64]) [libsame:amd64 on libsame:i386] [libsame:i386 on libsame:amd64] [libsame:i386 apt2:amd64 ] +Inst libsame:i386 [1] (2 unstable [i386]) [apt2:amd64 apt:i386 ] +Conf libsame:i386 (2 unstable [i386]) [apt2:amd64 apt:i386 ] +Conf libsame (2 unstable [amd64]) [apt2:amd64 apt:i386 ] +Inst apt2 [1] (2 unstable [amd64]) [apt:i386 ] +Conf apt2 (2 unstable [amd64]) [apt:i386 ] +Inst apt:i386 [1] (2 unstable [i386]) +Conf apt:i386 (2 unstable [i386])' aptget dist-upgrade -s -- cgit v1.2.3