summaryrefslogtreecommitdiff
path: root/test/integration
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration')
-rw-r--r--test/integration/framework44
-rwxr-xr-xtest/integration/skip-aptwebserver25
-rwxr-xr-xtest/integration/skip-bug-602412-dequote-redirect36
-rwxr-xr-xtest/integration/test-apt-get-changelog3
-rwxr-xr-xtest/integration/test-apt-get-download4
-rwxr-xr-xtest/integration/test-architecture-specification-parsing96
-rwxr-xr-xtest/integration/test-bug-593360-modifiers-in-names5
-rwxr-xr-xtest/integration/test-bug-602412-dequote-redirect29
-rwxr-xr-xtest/integration/test-bug-632221-cross-dependency-satisfaction123
-rwxr-xr-xtest/integration/test-bug-673536-pre-depends-breaks-loop23
-rwxr-xr-xtest/integration/test-bug-675449-essential-are-protected88
-rwxr-xr-xtest/integration/test-cachecontainer-architecture-specification87
-rwxr-xr-xtest/integration/test-ignore-provides-if-versioned-breaks150
-rwxr-xr-xtest/integration/test-ignore-provides-if-versioned-conflicts150
-rwxr-xr-xtest/integration/test-ubuntu-bug-346386-apt-get-update-paywall47
-rwxr-xr-xtest/integration/test-ubuntu-bug-835625-multiarch-lockstep-installed-first16
-rwxr-xr-xtest/integration/test-ubuntu-bug-985852-pre-depends-or-group-ordering21
17 files changed, 874 insertions, 73 deletions
diff --git a/test/integration/framework b/test/integration/framework
index 0670d6a78..965f984ca 100644
--- a/test/integration/framework
+++ b/test/integration/framework
@@ -107,6 +107,10 @@ aptitude() {
LD_LIBRARY_PATH=${BUILDDIRECTORY} $(which aptitude) $*
fi
}
+gdb() {
+ echo "gdb: run »$*«"
+ APT_CONFIG=aptconfig.conf LD_LIBRARY_PATH=${BUILDDIRECTORY} $(which gdb) ${BUILDDIRECTORY}/$1
+}
addtrap() {
CURRENTTRAP="$CURRENTTRAP $1"
@@ -151,7 +155,7 @@ setupenvironment() {
echo "DPKG::options:: \"--root=${TMPWORKINGDIRECTORY}/rootdir\";" >> aptconfig.conf
echo "DPKG::options:: \"--force-not-root\";" >> aptconfig.conf
echo "DPKG::options:: \"--force-bad-path\";" >> aptconfig.conf
- if ! $(which dpkg) --assert-multi-arch; then
+ if ! $(which dpkg) --assert-multi-arch 2>&1 > /dev/null; then
echo "DPKG::options:: \"--force-architecture\";" >> aptconfig.conf # Added to test multiarch before dpkg is ready for it…
fi
echo "DPKG::options:: \"--log=${TMPWORKINGDIRECTORY}/rootdir/var/log/dpkg.log\";" >> aptconfig.conf
@@ -199,7 +203,7 @@ configdpkg() {
echo -n > rootdir/var/lib/dpkg/status
fi
fi
- if $(which dpkg) --assert-multi-arch; then
+ if $(which dpkg) --assert-multi-arch 2>&1 > /dev/null; then
local ARCHS="$(getarchitectures)"
if echo "$ARCHS" | grep -E -q '[^ ]+ [^ ]+'; then
DPKGARCH="$(dpkg --print-architecture)"
@@ -300,23 +304,28 @@ echo '$NAME says \"Hello!\"'" > ${BUILDDIR}/${NAME}
Section: $SECTION
Priority: $PRIORITY
Maintainer: Joe Sixpack <joe@example.org>
-Standards-Version: 3.9.1
+Standards-Version: 3.9.3" > ${BUILDDIR}/debian/control
+ local BUILDDEPS="$(echo "$DEPENDENCIES" | grep '^Build-')"
+ test -z "$BUILDDEPS" || echo "$BUILDDEPS" >> ${BUILDDIR}/debian/control
+ echo "
+Package: $NAME" >> ${BUILDDIR}/debian/control
-Package: $NAME" > ${BUILDDIR}/debian/control
if [ "$ARCH" = 'all' ]; then
echo "Architecture: all" >> ${BUILDDIR}/debian/control
else
echo "Architecture: any" >> ${BUILDDIR}/debian/control
fi
- test -z "$DEPENDENCIES" || echo "$DEPENDENCIES" >> ${BUILDDIR}/debian/control
+ local DEPS="$(echo "$DEPENDENCIES" | grep -v '^Build-')"
+ test -z "$DEPS" || echo "$DEPS" >> ${BUILDDIR}/debian/control
if [ -z "$DESCRIPTION" ]; then
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…" >> ${BUILDDIR}/debian/control
else
- echo "Description: $DESCRIPTION" >> ${BUILDIR}/debian/control
+ echo "Description: $DESCRIPTION" >> ${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._+~-]*$')"
for SRC in $SRCS; do
@@ -504,7 +513,8 @@ Architecture: $ARCH" >> $FILE
test -z "$DEPENDENCIES" || echo "$DEPENDENCIES" >> $FILE
echo "Files:
d41d8cd98f00b204e9800998ecf8427e 0 ${NAME}_${VERSION}.dsc
- d41d8cd98f00b204e9800998ecf8427e 0 ${NAME}_${VERSION}.tar.gz" >> $FILE
+ d41d8cd98f00b204e9800998ecf8427e 0 ${NAME}_${VERSION}.tar.gz
+" >> $FILE
}
insertinstalledpackage() {
@@ -678,20 +688,30 @@ signreleasefiles() {
}
changetowebserver() {
- if which weborf > /dev/null; then
- weborf -xb aptarchive/ 2>&1 > /dev/null &
+ if [ -n "$1" ] && ! test -x ${BUILDDIRECTORY}/aptwebserver; then
+ msgdie 'Need the aptwebserver when passing arguments'
+ fi
+
+ local LOG='/dev/null'
+ if test -x ${BUILDDIRECTORY}/aptwebserver; then
+ cd aptarchive
+ LD_LIBRARY_PATH=${BUILDDIRECTORY} ${BUILDDIRECTORY}/aptwebserver $@ 2> $LOG > $LOG &
+ addtrap "kill $!;"
+ cd - > /dev/null
+ elif which weborf > /dev/null; then
+ weborf -xb aptarchive/ 2> $LOG > $LOG &
addtrap "kill $!;"
elif which gatling > /dev/null; then
cd aptarchive
- gatling -p 8080 -F -S 2>&1 > /dev/null &
+ gatling -p 8080 -F -S 2> $LOG > $LOG &
addtrap "kill $!;"
cd - > /dev/null
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 &
+ lighttpd -t -f lighttpd.conf 2> $LOG > $LOG || msgdie 'Can not change to webserver: our lighttpd config is invalid'
+ lighttpd -D -f lighttpd.conf 2> $LOG > $LOG &
addtrap "kill $!;"
else
msgdie 'You have to install weborf or lighttpd first'
diff --git a/test/integration/skip-aptwebserver b/test/integration/skip-aptwebserver
new file mode 100755
index 000000000..0622941ce
--- /dev/null
+++ b/test/integration/skip-aptwebserver
@@ -0,0 +1,25 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+
+setupenvironment
+configarchitecture 'amd64'
+
+buildsimplenativepackage 'apt' 'all' '1.0' 'stable'
+
+setupaptarchive
+changetowebserver
+
+rm -rf rootdir/var/lib/apt/lists
+aptget update -qq
+testequal 'Hit http://localhost stable InRelease
+Hit http://localhost stable/main Sources
+Hit http://localhost stable/main amd64 Packages
+Hit http://localhost stable/main Translation-en
+Reading package lists...' aptget update
+
+mv rootdir/var/lib/apt/lists/localhost* rootdir/var/lib/apt/lists/partial
+aptget update
+
diff --git a/test/integration/skip-bug-602412-dequote-redirect b/test/integration/skip-bug-602412-dequote-redirect
deleted file mode 100755
index a63d36246..000000000
--- a/test/integration/skip-bug-602412-dequote-redirect
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/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'
-
diff --git a/test/integration/test-apt-get-changelog b/test/integration/test-apt-get-changelog
index 0a80cc08c..d013cc458 100755
--- a/test/integration/test-apt-get-changelog
+++ b/test/integration/test-apt-get-changelog
@@ -17,6 +17,9 @@ echo 'Apt::Changelogs::Server "http://localhost:8080/";' >> ./aptconfig.conf
testequal "'http://localhost:8080//pool/apt_1.0/changelog'" aptget changelog apt --print-uris
+testequal "'http://localhost:8080//pool/apt_1.0/changelog'
+'http://localhost:8080//pool/apt_1.0/changelog'" aptget changelog apt apt --print-uris
+
aptget changelog apt -qq > apt.changelog
testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0/changelog)"
rm apt.changelog
diff --git a/test/integration/test-apt-get-download b/test/integration/test-apt-get-download
index 4edb7c173..b164f7dba 100755
--- a/test/integration/test-apt-get-download
+++ b/test/integration/test-apt-get-download
@@ -9,6 +9,7 @@ configarchitecture "i386"
buildsimplenativepackage 'apt' 'all' '1.0' 'stable'
buildsimplenativepackage 'apt' 'all' '2.0' 'unstable'
+insertinstalledpackage 'vrms' 'all' '1.0'
setupaptarchive
@@ -26,3 +27,6 @@ testdownload apt_2.0_all.deb apt
DEBFILE="$(readlink -f aptarchive)/pool/apt_2.0_all.deb"
testequal "'file://${DEBFILE}' apt_2.0_all.deb $(stat -c%s $DEBFILE) sha256:$(sha256sum $DEBFILE | cut -d' ' -f 1)" aptget download apt --print-uris
+
+# deb:677887
+testequal "E: Can't find a source to download version '1.0' of 'vrms:i386'" aptget download vrms
diff --git a/test/integration/test-architecture-specification-parsing b/test/integration/test-architecture-specification-parsing
new file mode 100755
index 000000000..8f365dd55
--- /dev/null
+++ b/test/integration/test-architecture-specification-parsing
@@ -0,0 +1,96 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'amd64'
+
+buildsimplenativepackage 'pkg-arch-foo' 'amd64' '1.0' 'stable' 'Build-Depends: foo [amd64 !amd64]
+Depends: foo [amd64 !amd64]'
+buildsimplenativepackage 'pkg-arch-no-foo' 'amd64' '1.0' 'stable' 'Build-Depends: foo [!amd64 amd64]
+Depends: foo [!amd64 amd64]'
+buildsimplenativepackage 'pkg-arch-foo-unrelated-no' 'amd64' '1.0' 'stable' 'Build-Depends: foo [!kfreebsd-any amd64]
+Depends: foo [!kfreebsd-any amd64]'
+buildsimplenativepackage 'pkg-arch-foo-unrelated-no2' 'amd64' '1.0' 'stable' 'Build-Depends: foo [amd64 !kfreebsd-any]
+Depends: foo [amd64 !kfreebsd-any]'
+
+buildsimplenativepackage 'foo' 'amd64' '1.0' 'stable'
+
+insertinstalledpackage 'build-essential' 'all' '11.5' 'Multi-Arch: foreign'
+
+setupaptarchive
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following extra packages will be installed:
+ foo
+The following NEW packages will be installed:
+ foo pkg-arch-foo
+0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
+Inst foo (1.0 stable [amd64])
+Inst pkg-arch-foo (1.0 stable [amd64])
+Conf foo (1.0 stable [amd64])
+Conf pkg-arch-foo (1.0 stable [amd64])' aptget install pkg-arch-foo -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ pkg-arch-no-foo
+0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
+Inst pkg-arch-no-foo (1.0 stable [amd64])
+Conf pkg-arch-no-foo (1.0 stable [amd64])' aptget install pkg-arch-no-foo -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following extra packages will be installed:
+ foo
+The following NEW packages will be installed:
+ foo pkg-arch-foo-unrelated-no
+0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
+Inst foo (1.0 stable [amd64])
+Inst pkg-arch-foo-unrelated-no (1.0 stable [amd64])
+Conf foo (1.0 stable [amd64])
+Conf pkg-arch-foo-unrelated-no (1.0 stable [amd64])' aptget install pkg-arch-foo-unrelated-no -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following extra packages will be installed:
+ foo
+The following NEW packages will be installed:
+ foo pkg-arch-foo-unrelated-no2
+0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
+Inst foo (1.0 stable [amd64])
+Inst pkg-arch-foo-unrelated-no2 (1.0 stable [amd64])
+Conf foo (1.0 stable [amd64])
+Conf pkg-arch-foo-unrelated-no2 (1.0 stable [amd64])' aptget install pkg-arch-foo-unrelated-no2 -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ foo
+0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
+Inst foo (1.0 stable [amd64])
+Conf foo (1.0 stable [amd64])' aptget build-dep pkg-arch-foo -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget build-dep pkg-arch-no-foo -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ foo
+0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
+Inst foo (1.0 stable [amd64])
+Conf foo (1.0 stable [amd64])' aptget build-dep pkg-arch-foo-unrelated-no -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ foo
+0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
+Inst foo (1.0 stable [amd64])
+Conf foo (1.0 stable [amd64])' aptget build-dep pkg-arch-foo-unrelated-no2 -s
+
+
diff --git a/test/integration/test-bug-593360-modifiers-in-names b/test/integration/test-bug-593360-modifiers-in-names
index 83a3cfabf..74826cbdb 100755
--- a/test/integration/test-bug-593360-modifiers-in-names
+++ b/test/integration/test-bug-593360-modifiers-in-names
@@ -15,6 +15,11 @@ The following NEW packages will be installed:
Inst g++ (4:4.4.5-1 localhost [i386])
Conf g++ (4:4.4.5-1 localhost [i386])' aptget install g++ -s
+testequal "Reading package lists...
+Building dependency tree...
+Package 'g++' is not installed, so not removed
+0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded." aptget remove g++ -s
+
testequal 'Reading package lists...
Building dependency tree...
The following NEW packages will be installed:
diff --git a/test/integration/test-bug-602412-dequote-redirect b/test/integration/test-bug-602412-dequote-redirect
new file mode 100755
index 000000000..f1e67c6d8
--- /dev/null
+++ b/test/integration/test-bug-602412-dequote-redirect
@@ -0,0 +1,29 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'amd64'
+
+buildsimplenativepackage 'unrelated' 'all' '0.5~squeeze1' 'unstable'
+
+setupaptarchive
+changetowebserver -o aptwebserver::redirect::replace::/pool/=/newpool/ \
+ -o aptwebserver::redirect::replace::/dists/=/newdists/
+
+mv aptarchive/pool aptarchive/newpool
+mv aptarchive/dists aptarchive/newdists
+
+msgtest 'Test redirection works in' 'apt-get update'
+aptget update -qq && msgpass || msgfail
+
+# check that I-M-S header is kept in redirections
+testequal 'Hit http://localhost unstable InRelease
+Hit http://localhost unstable/main Sources
+Hit http://localhost unstable/main amd64 Packages
+Hit http://localhost unstable/main Translation-en
+Reading package lists...' aptget update
+
+msgtest 'Test redirection works in' 'package download'
+aptget install unrelated --download-only -qq && msgpass || msgfail
diff --git a/test/integration/test-bug-632221-cross-dependency-satisfaction b/test/integration/test-bug-632221-cross-dependency-satisfaction
index 30df48604..208c613a2 100755
--- a/test/integration/test-bug-632221-cross-dependency-satisfaction
+++ b/test/integration/test-bug-632221-cross-dependency-satisfaction
@@ -18,16 +18,76 @@ insertpackage 'unstable' 'libfwibble-dev' 'amd64,armel' '1.0' 'Depends: libfwibb
insertpackage 'unstable' 'cool' 'amd64,armel' '1.0' 'Multi-Arch: allowed'
insertpackage 'unstable' 'amdboot' 'amd64' '1.0'
insertpackage 'unstable' 'foreigner' 'amd64,armel' '1.0' 'Multi-Arch: foreign'
+insertpackage 'unstable' 'arm-stuff' 'armel' '1.0'
+insertpackage 'unstable' 'linux-stuff' 'amd64,armel' '1.0'
-insertsource 'unstable' 'apt' 'any' '0.8.15' 'Build-Depends: doxygen, libc6-dev, libc6-dev:native, cool:any, amdboot:amd64, foreigner, libfwibble-dev'
+insertsource 'unstable' 'apt' 'any' '0.8.15' 'Build-Depends: doxygen, libc6-dev, libc6-dev:native, cool:any, amdboot:amd64, foreigner, libfwibble-dev, arm-stuff [any-arm] | linux-stuff [ linux-any]'
+
+insertsource 'unstable' 'forbidden-none' 'any' '1' 'Build-Depends: amdboot:any'
+insertsource 'unstable' 'forbidden-same' 'any' '1' 'Build-Depends: libc6:any'
+insertsource 'unstable' 'forbidden-foreign' 'any' '1' 'Build-Depends: doxygen:any'
+
+insertpackage 'unstable' 'specific' 'amd64' '1.0' 'Depends: libc6:amd64'
+insertpackage 'unstable' 'specific' 'armel' '1.0' 'Depends: libc6:armel'
+
+insertsource 'unstable' 'source-specific-amd64' 'amd64' '1' 'Build-Depends: specific:amd64'
+insertsource 'unstable' 'source-specific-armel' 'armel' '1' 'Build-Depends: specific:armel'
setupaptarchive
+testequal "Reading package lists...
+Building dependency tree...
+E: Build-Depends dependency for forbidden-none can't be satisfied because amdboot:any is not allowed on 'Multi-Arch: none' packages" aptget build-dep forbidden-none -s -a armel
+testequal "Reading package lists...
+Building dependency tree...
+E: Build-Depends dependency for forbidden-same can't be satisfied because libc6:any is not allowed on 'Multi-Arch: same' packages" aptget build-dep forbidden-same -s -a armel
+testequal "Reading package lists...
+Building dependency tree...
+E: Build-Depends dependency for forbidden-foreign can't be satisfied because doxygen:any is not allowed on 'Multi-Arch: foreign' packages" aptget build-dep forbidden-foreign -s -a armel
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ libc6 specific
+0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
+Inst libc6 (1.0 unstable [amd64])
+Inst specific (1.0 unstable [amd64])
+Conf libc6 (1.0 unstable [amd64])
+Conf specific (1.0 unstable [amd64])' aptget build-dep source-specific-amd64 -s
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ libc6 specific
+0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
+Inst libc6 (1.0 unstable [amd64])
+Inst specific (1.0 unstable [amd64])
+Conf libc6 (1.0 unstable [amd64])
+Conf specific (1.0 unstable [amd64])' aptget build-dep source-specific-amd64 -s -a armel
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ libc6:armel specific:armel
+0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
+Inst libc6:armel (1.0 unstable [armel])
+Inst specific:armel (1.0 unstable [armel])
+Conf libc6:armel (1.0 unstable [armel])
+Conf specific:armel (1.0 unstable [armel])' aptget build-dep source-specific-armel -s
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ libc6:armel specific:armel
+0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
+Inst libc6:armel (1.0 unstable [armel])
+Inst specific:armel (1.0 unstable [armel])
+Conf libc6:armel (1.0 unstable [armel])
+Conf specific:armel (1.0 unstable [armel])' aptget build-dep source-specific-armel -s -a armel
+
testequal 'Reading package lists...
Building dependency tree...
The following NEW packages will be installed:
amdboot cool doxygen foreigner libc6 libc6-dev libfwibble-dev libfwibble1
-0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
+ linux-stuff
+0 upgraded, 9 newly installed, 0 to remove and 0 not upgraded.
Inst amdboot (1.0 unstable [amd64])
Inst cool (1.0 unstable [amd64])
Inst doxygen (1.0 unstable [amd64])
@@ -36,6 +96,7 @@ Inst libc6 (1.0 unstable [amd64])
Inst libc6-dev (1.0 unstable [amd64])
Inst libfwibble1 (1.0 unstable [amd64])
Inst libfwibble-dev (1.0 unstable [amd64])
+Inst linux-stuff (1.0 unstable [amd64])
Conf amdboot (1.0 unstable [amd64])
Conf cool (1.0 unstable [amd64])
Conf doxygen (1.0 unstable [amd64])
@@ -43,15 +104,17 @@ Conf foreigner (1.0 unstable [amd64])
Conf libc6 (1.0 unstable [amd64])
Conf libc6-dev (1.0 unstable [amd64])
Conf libfwibble1 (1.0 unstable [amd64])
-Conf libfwibble-dev (1.0 unstable [amd64])' aptget build-dep apt -s
+Conf libfwibble-dev (1.0 unstable [amd64])
+Conf linux-stuff (1.0 unstable [amd64])' aptget build-dep apt -s
testequal 'Reading package lists...
Building dependency tree...
The following NEW packages will be installed:
- amdboot cool doxygen foreigner libc6 libc6:armel libc6-dev libc6-dev:armel
- libfwibble-dev:armel libfwibble1:armel
-0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded.
+ amdboot arm-stuff:armel cool doxygen foreigner libc6 libc6:armel libc6-dev
+ libc6-dev:armel libfwibble-dev:armel libfwibble1:armel
+0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded.
Inst amdboot (1.0 unstable [amd64])
+Inst arm-stuff:armel (1.0 unstable [armel])
Inst cool (1.0 unstable [amd64])
Inst doxygen (1.0 unstable [amd64])
Inst foreigner (1.0 unstable [amd64])
@@ -62,6 +125,7 @@ Inst libc6-dev:armel (1.0 unstable [armel])
Inst libfwibble1:armel (1.0 unstable [armel])
Inst libfwibble-dev:armel (1.0 unstable [armel])
Conf amdboot (1.0 unstable [amd64])
+Conf arm-stuff:armel (1.0 unstable [armel])
Conf cool (1.0 unstable [amd64])
Conf doxygen (1.0 unstable [amd64])
Conf foreigner (1.0 unstable [amd64])
@@ -77,10 +141,11 @@ configarchitecture 'armel' 'amd64'
testequal 'Reading package lists...
Building dependency tree...
The following NEW packages will be installed:
- amdboot:amd64 cool doxygen foreigner libc6 libc6-dev libfwibble-dev
- libfwibble1
-0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
+ amdboot:amd64 arm-stuff cool doxygen foreigner libc6 libc6-dev
+ libfwibble-dev libfwibble1
+0 upgraded, 9 newly installed, 0 to remove and 0 not upgraded.
Inst amdboot:amd64 (1.0 unstable [amd64])
+Inst arm-stuff (1.0 unstable [armel])
Inst cool (1.0 unstable [armel])
Inst doxygen (1.0 unstable [armel])
Inst foreigner (1.0 unstable [armel])
@@ -89,6 +154,7 @@ Inst libc6-dev (1.0 unstable [armel])
Inst libfwibble1 (1.0 unstable [armel])
Inst libfwibble-dev (1.0 unstable [armel])
Conf amdboot:amd64 (1.0 unstable [amd64])
+Conf arm-stuff (1.0 unstable [armel])
Conf cool (1.0 unstable [armel])
Conf doxygen (1.0 unstable [armel])
Conf foreigner (1.0 unstable [armel])
@@ -101,8 +167,8 @@ testequal 'Reading package lists...
Building dependency tree...
The following NEW packages will be installed:
amdboot:amd64 cool doxygen foreigner libc6:amd64 libc6 libc6-dev:amd64
- libc6-dev libfwibble-dev:amd64 libfwibble1:amd64
-0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded.
+ libc6-dev libfwibble-dev:amd64 libfwibble1:amd64 linux-stuff:amd64
+0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded.
Inst amdboot:amd64 (1.0 unstable [amd64])
Inst cool (1.0 unstable [armel])
Inst doxygen (1.0 unstable [armel])
@@ -113,6 +179,7 @@ Inst libc6-dev:amd64 (1.0 unstable [amd64])
Inst libc6-dev (1.0 unstable [armel])
Inst libfwibble1:amd64 (1.0 unstable [amd64])
Inst libfwibble-dev:amd64 (1.0 unstable [amd64])
+Inst linux-stuff:amd64 (1.0 unstable [amd64])
Conf amdboot:amd64 (1.0 unstable [amd64])
Conf cool (1.0 unstable [armel])
Conf doxygen (1.0 unstable [armel])
@@ -122,7 +189,8 @@ Conf libc6 (1.0 unstable [armel])
Conf libc6-dev:amd64 (1.0 unstable [amd64])
Conf libc6-dev (1.0 unstable [armel])
Conf libfwibble1:amd64 (1.0 unstable [amd64])
-Conf libfwibble-dev:amd64 (1.0 unstable [amd64])' aptget build-dep apt -s -a amd64
+Conf libfwibble-dev:amd64 (1.0 unstable [amd64])
+Conf linux-stuff:amd64 (1.0 unstable [amd64])' aptget build-dep apt -s -a amd64
configarchitecture 'amd64' 'armel'
@@ -132,28 +200,31 @@ insertinstalledpackage 'foreigner' 'armel' '0.5'
testequal 'Reading package lists...
Building dependency tree...
The following NEW packages will be installed:
- amdboot doxygen libc6 libc6-dev libfwibble-dev libfwibble1
-0 upgraded, 6 newly installed, 0 to remove and 2 not upgraded.
+ amdboot doxygen libc6 libc6-dev libfwibble-dev libfwibble1 linux-stuff
+0 upgraded, 7 newly installed, 0 to remove and 2 not upgraded.
Inst amdboot (1.0 unstable [amd64])
Inst doxygen (1.0 unstable [amd64])
Inst libc6 (1.0 unstable [amd64])
Inst libc6-dev (1.0 unstable [amd64])
Inst libfwibble1 (1.0 unstable [amd64])
Inst libfwibble-dev (1.0 unstable [amd64])
+Inst linux-stuff (1.0 unstable [amd64])
Conf amdboot (1.0 unstable [amd64])
Conf doxygen (1.0 unstable [amd64])
Conf libc6 (1.0 unstable [amd64])
Conf libc6-dev (1.0 unstable [amd64])
Conf libfwibble1 (1.0 unstable [amd64])
-Conf libfwibble-dev (1.0 unstable [amd64])' aptget build-dep apt -s
+Conf libfwibble-dev (1.0 unstable [amd64])
+Conf linux-stuff (1.0 unstable [amd64])' aptget build-dep apt -s
testequal 'Reading package lists...
Building dependency tree...
The following NEW packages will be installed:
- amdboot doxygen libc6 libc6:armel libc6-dev libc6-dev:armel
+ amdboot arm-stuff:armel doxygen libc6 libc6:armel libc6-dev libc6-dev:armel
libfwibble-dev:armel libfwibble1:armel
-0 upgraded, 8 newly installed, 0 to remove and 2 not upgraded.
+0 upgraded, 9 newly installed, 0 to remove and 2 not upgraded.
Inst amdboot (1.0 unstable [amd64])
+Inst arm-stuff:armel (1.0 unstable [armel])
Inst doxygen (1.0 unstable [amd64])
Inst libc6 (1.0 unstable [amd64])
Inst libc6:armel (1.0 unstable [armel])
@@ -162,6 +233,7 @@ Inst libc6-dev:armel (1.0 unstable [armel])
Inst libfwibble1:armel (1.0 unstable [armel])
Inst libfwibble-dev:armel (1.0 unstable [armel])
Conf amdboot (1.0 unstable [amd64])
+Conf arm-stuff:armel (1.0 unstable [armel])
Conf doxygen (1.0 unstable [amd64])
Conf libc6 (1.0 unstable [amd64])
Conf libc6:armel (1.0 unstable [armel])
@@ -178,10 +250,12 @@ Building dependency tree...
The following packages will be REMOVED:
cool:amd64
The following NEW packages will be installed:
- amdboot:amd64 cool doxygen libc6 libc6-dev libfwibble-dev libfwibble1
-0 upgraded, 7 newly installed, 1 to remove and 1 not upgraded.
+ amdboot:amd64 arm-stuff cool doxygen libc6 libc6-dev libfwibble-dev
+ libfwibble1
+0 upgraded, 8 newly installed, 1 to remove and 1 not upgraded.
Remv cool:amd64 [0.5]
Inst amdboot:amd64 (1.0 unstable [amd64])
+Inst arm-stuff (1.0 unstable [armel])
Inst cool (1.0 unstable [armel])
Inst doxygen (1.0 unstable [armel])
Inst libc6 (1.0 unstable [armel])
@@ -189,6 +263,7 @@ Inst libc6-dev (1.0 unstable [armel])
Inst libfwibble1 (1.0 unstable [armel])
Inst libfwibble-dev (1.0 unstable [armel])
Conf amdboot:amd64 (1.0 unstable [amd64])
+Conf arm-stuff (1.0 unstable [armel])
Conf cool (1.0 unstable [armel])
Conf doxygen (1.0 unstable [armel])
Conf libc6 (1.0 unstable [armel])
@@ -200,8 +275,8 @@ testequal 'Reading package lists...
Building dependency tree...
The following NEW packages will be installed:
amdboot:amd64 doxygen libc6:amd64 libc6 libc6-dev:amd64 libc6-dev
- libfwibble-dev:amd64 libfwibble1:amd64
-0 upgraded, 8 newly installed, 0 to remove and 2 not upgraded.
+ libfwibble-dev:amd64 libfwibble1:amd64 linux-stuff:amd64
+0 upgraded, 9 newly installed, 0 to remove and 2 not upgraded.
Inst amdboot:amd64 (1.0 unstable [amd64])
Inst doxygen (1.0 unstable [armel])
Inst libc6:amd64 (1.0 unstable [amd64])
@@ -210,6 +285,7 @@ Inst libc6-dev:amd64 (1.0 unstable [amd64])
Inst libc6-dev (1.0 unstable [armel])
Inst libfwibble1:amd64 (1.0 unstable [amd64])
Inst libfwibble-dev:amd64 (1.0 unstable [amd64])
+Inst linux-stuff:amd64 (1.0 unstable [amd64])
Conf amdboot:amd64 (1.0 unstable [amd64])
Conf doxygen (1.0 unstable [armel])
Conf libc6:amd64 (1.0 unstable [amd64])
@@ -217,6 +293,5 @@ Conf libc6 (1.0 unstable [armel])
Conf libc6-dev:amd64 (1.0 unstable [amd64])
Conf libc6-dev (1.0 unstable [armel])
Conf libfwibble1:amd64 (1.0 unstable [amd64])
-Conf libfwibble-dev:amd64 (1.0 unstable [amd64])' aptget build-dep apt -s -a amd64
-
-
+Conf libfwibble-dev:amd64 (1.0 unstable [amd64])
+Conf linux-stuff:amd64 (1.0 unstable [amd64])' aptget build-dep apt -s -a amd64
diff --git a/test/integration/test-bug-673536-pre-depends-breaks-loop b/test/integration/test-bug-673536-pre-depends-breaks-loop
new file mode 100755
index 000000000..e9d3c4de6
--- /dev/null
+++ b/test/integration/test-bug-673536-pre-depends-breaks-loop
@@ -0,0 +1,23 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'native'
+
+buildsimplenativepackage 'basic' 'native' '1' 'stable'
+buildsimplenativepackage 'basic' 'native' '2' 'unstable' 'Pre-Depends: common'
+buildsimplenativepackage 'common' 'native' '2' 'unstable' 'Breaks: basic (<= 1)'
+
+setupaptarchive
+
+# we check with 'real' packages here as the simulation reports a 'Conf broken'
+# which is technical correct for the simulation, but testing errormsg is ugly
+
+aptget install basic=1 -qq > /dev/null
+testdpkginstalled basic
+testdpkgnotinstalled common
+
+aptget dist-upgrade -qq > /dev/null
+testdpkginstalled basic common
diff --git a/test/integration/test-bug-675449-essential-are-protected b/test/integration/test-bug-675449-essential-are-protected
new file mode 100755
index 000000000..7d8cc3484
--- /dev/null
+++ b/test/integration/test-bug-675449-essential-are-protected
@@ -0,0 +1,88 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'amd64' 'i386'
+
+insertinstalledpackage 'pkg-native' 'amd64' '1' 'Multi-Arch: foreign
+Essential: yes'
+insertinstalledpackage 'pkg-foreign' 'i386' '1' 'Multi-Arch: foreign
+Essential: yes'
+insertinstalledpackage 'pkg-none-native' 'amd64' '1' 'Essential: yes'
+insertinstalledpackage 'pkg-none-foreign' 'i386' '1' 'Essential: yes'
+
+insertpackage 'unstable' 'pkg-native' 'amd64,i386' '2' 'Multi-Arch: foreign
+Essential: yes'
+insertpackage 'unstable' 'pkg-foreign' 'amd64,i386' '2' 'Multi-Arch: foreign
+Depends: pkg-depends-new
+Essential: yes'
+insertpackage 'unstable' 'pkg-none-native' 'amd64,i386' '2' 'Essential: yes'
+insertpackage 'unstable' 'pkg-none-foreign' 'amd64,i386' '2' 'Essential: yes
+Depends: pkg-depends-new'
+
+insertpackage 'unstable' 'pkg-none-new' 'amd64,i386' '2' 'Essential: yes'
+insertpackage 'unstable' 'pkg-depends-new' 'amd64,i386' '2' 'Essential: yes'
+
+setupaptarchive
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following packages will be REMOVED:
+ pkg-native*
+WARNING: The following essential packages will be removed.
+This should NOT be done unless you know exactly what you are doing!
+ pkg-native
+0 upgraded, 0 newly installed, 1 to remove and 3 not upgraded.
+Purg pkg-native [1]' aptget purge pkg-native -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following packages will be REMOVED:
+ pkg-foreign:i386*
+WARNING: The following essential packages will be removed.
+This should NOT be done unless you know exactly what you are doing!
+ pkg-foreign:i386
+0 upgraded, 0 newly installed, 1 to remove and 3 not upgraded.
+Purg pkg-foreign:i386 [1]' aptget purge pkg-foreign:i386 -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following packages will be REMOVED:
+ pkg-none-native*
+WARNING: The following essential packages will be removed.
+This should NOT be done unless you know exactly what you are doing!
+ pkg-none-native
+0 upgraded, 0 newly installed, 1 to remove and 3 not upgraded.
+Purg pkg-none-native [1]' aptget purge pkg-none-native -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following packages will be REMOVED:
+ pkg-none-foreign:i386*
+WARNING: The following essential packages will be removed.
+This should NOT be done unless you know exactly what you are doing!
+ pkg-none-foreign:i386
+0 upgraded, 0 newly installed, 1 to remove and 3 not upgraded.
+Purg pkg-none-foreign:i386 [1]' aptget purge pkg-none-foreign:i386 -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ pkg-depends-new:i386 pkg-none-new
+The following packages will be upgraded:
+ pkg-foreign:i386 pkg-native pkg-none-foreign:i386 pkg-none-native
+4 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
+Inst pkg-depends-new:i386 (2 unstable [i386])
+Conf pkg-depends-new:i386 (2 unstable [i386])
+Inst pkg-foreign:i386 [1] (2 unstable [i386])
+Conf pkg-foreign:i386 (2 unstable [i386])
+Inst pkg-native [1] (2 unstable [amd64])
+Conf pkg-native (2 unstable [amd64])
+Inst pkg-none-foreign:i386 [1] (2 unstable [i386])
+Conf pkg-none-foreign:i386 (2 unstable [i386])
+Inst pkg-none-native [1] (2 unstable [amd64])
+Conf pkg-none-native (2 unstable [amd64])
+Inst pkg-none-new (2 unstable [amd64])
+Conf pkg-none-new (2 unstable [amd64])' aptget dist-upgrade -s
diff --git a/test/integration/test-cachecontainer-architecture-specification b/test/integration/test-cachecontainer-architecture-specification
new file mode 100755
index 000000000..174efb087
--- /dev/null
+++ b/test/integration/test-cachecontainer-architecture-specification
@@ -0,0 +1,87 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'amd64' 'armel'
+
+#insertinstalledpackage 'xserver-xorg-core' 'amd64' '2:1.7.6-2ubuntu7.10'
+insertpackage 'unstable' 'libsame' 'armel,amd64' '1' 'Multi-Arch: same'
+
+setupaptarchive
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ libsame
+0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
+Inst libsame (1 unstable [amd64])
+Conf libsame (1 unstable [amd64])' aptget -s install libsame
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ libsame:armel
+0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
+Inst libsame:armel (1 unstable [armel])
+Conf libsame:armel (1 unstable [armel])' aptget -s install libsame:armel
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ libsame
+0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
+Inst libsame (1 unstable [amd64])
+Conf libsame (1 unstable [amd64])' aptget -s install libsame:amd64
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ libsame libsame:armel
+0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
+Inst libsame (1 unstable [amd64])
+Inst libsame:armel (1 unstable [armel])
+Conf libsame (1 unstable [amd64])
+Conf libsame:armel (1 unstable [armel])' aptget -s install libsame:armel libsame:amd64
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ libsame libsame:armel
+0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
+Inst libsame (1 unstable [amd64])
+Inst libsame:armel (1 unstable [armel])
+Conf libsame (1 unstable [amd64])
+Conf libsame:armel (1 unstable [armel])' aptget -s install libsame:*
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ libsame
+0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
+Inst libsame (1 unstable [amd64])
+Conf libsame (1 unstable [amd64])' aptget -s install libsame:any
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ libsame libsame:armel
+0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
+Inst libsame (1 unstable [amd64])
+Inst libsame:armel (1 unstable [armel])
+Conf libsame (1 unstable [amd64])
+Conf libsame:armel (1 unstable [armel])' aptget -s install libsame:a*
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ libsame
+0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
+Inst libsame (1 unstable [amd64])
+Conf libsame (1 unstable [amd64])' aptget -s install libsame:linux-any
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ libsame libsame:armel
+0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
+Inst libsame (1 unstable [amd64])
+Inst libsame:armel (1 unstable [armel])
+Conf libsame (1 unstable [amd64])
+Conf libsame:armel (1 unstable [armel])' aptget -s install libsame:linux-*
+testequal 'Reading package lists...
+Building dependency tree...
+E: Unable to locate package libsame' aptget -s install libsame:windows-any
diff --git a/test/integration/test-ignore-provides-if-versioned-breaks b/test/integration/test-ignore-provides-if-versioned-breaks
new file mode 100755
index 000000000..f8b4544a0
--- /dev/null
+++ b/test/integration/test-ignore-provides-if-versioned-breaks
@@ -0,0 +1,150 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'i386' 'amd64'
+
+insertpackage 'unstable' 'unrlated' 'all' '1.0'
+
+insertinstalledpackage 'foo' 'i386' '2.0'
+insertpackage 'unstable' 'foo' 'i386' '4.0'
+insertpackage 'unstable' 'foo-provider' 'i386' '1.0' 'Provides: foo'
+insertpackage 'unstable' 'foo-breaker-3' 'i386' '1.0' 'Breaks: foo (<< 3.0)'
+insertpackage 'unstable' 'foo-breaker-2' 'i386' '1.0' 'Breaks: foo (<< 2.0)'
+insertpackage 'unstable' 'foo-breaker-none' 'i386' '1.0' 'Breaks: foo'
+
+insertinstalledpackage 'foo-foreign' 'amd64' '2.0' 'Multi-Arch: foreign'
+insertpackage 'unstable' 'foo-foreign' 'amd64' '4.0' 'Multi-Arch: foreign'
+insertpackage 'unstable' 'foo-foreign-provider' 'i386' '1.0' 'Provides: foo-foreign'
+insertpackage 'unstable' 'foo-foreign-breaker-3' 'i386' '1.0' 'Breaks: foo-foreign (<< 3.0)'
+insertpackage 'unstable' 'foo-foreign-breaker-2' 'i386' '1.0' 'Breaks: foo-foreign (<< 2.0)'
+insertpackage 'unstable' 'foo-foreign-breaker-none' 'i386' '1.0' 'Breaks: foo-foreign'
+
+insertinstalledpackage 'foo-same' 'i386,amd64' '2.0' 'Multi-Arch: same'
+insertpackage 'unstable' 'foo-same' 'i386,amd64' '4.0' 'Multi-Arch: same'
+insertpackage 'unstable' 'foo-same-provider' 'i386' '1.0' 'Provides: foo-same'
+insertpackage 'unstable' 'foo-same-breaker-3' 'i386' '1.0' 'Breaks: foo-same (<< 3.0)'
+insertpackage 'unstable' 'foo-same-breaker-2' 'i386' '1.0' 'Breaks: foo-same (<< 2.0)'
+insertpackage 'unstable' 'foo-same-breaker-none' 'i386' '1.0' 'Breaks: foo-same'
+
+
+
+setupaptarchive
+
+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:
+ foo-breaker-none : Breaks: foo
+E: Unable to correct problems, you have held broken packages.' aptget install foo-provider foo-breaker-none -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ foo-breaker-2 foo-provider
+0 upgraded, 2 newly installed, 0 to remove and 4 not upgraded.
+Inst foo-breaker-2 (1.0 unstable [i386])
+Inst foo-provider (1.0 unstable [i386])
+Conf foo-breaker-2 (1.0 unstable [i386])
+Conf foo-provider (1.0 unstable [i386])' aptget install foo-provider foo-breaker-2 -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following extra packages will be installed:
+ foo
+The following NEW packages will be installed:
+ foo-breaker-3 foo-provider
+The following packages will be upgraded:
+ foo
+1 upgraded, 2 newly installed, 0 to remove and 3 not upgraded.
+Inst foo [2.0] (4.0 unstable [i386])
+Inst foo-breaker-3 (1.0 unstable [i386])
+Inst foo-provider (1.0 unstable [i386])
+Conf foo (4.0 unstable [i386])
+Conf foo-breaker-3 (1.0 unstable [i386])
+Conf foo-provider (1.0 unstable [i386])' aptget install foo-provider foo-breaker-3 -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:
+ foo-foreign-breaker-none : Breaks: foo-foreign
+E: Unable to correct problems, you have held broken packages.' aptget install foo-foreign-provider foo-foreign-breaker-none -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ foo-foreign-breaker-2 foo-foreign-provider
+0 upgraded, 2 newly installed, 0 to remove and 4 not upgraded.
+Inst foo-foreign-breaker-2 (1.0 unstable [i386])
+Inst foo-foreign-provider (1.0 unstable [i386])
+Conf foo-foreign-breaker-2 (1.0 unstable [i386])
+Conf foo-foreign-provider (1.0 unstable [i386])' aptget install foo-foreign-provider foo-foreign-breaker-2 -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following extra packages will be installed:
+ foo-foreign:amd64
+The following NEW packages will be installed:
+ foo-foreign-breaker-3 foo-foreign-provider
+The following packages will be upgraded:
+ foo-foreign:amd64
+1 upgraded, 2 newly installed, 0 to remove and 3 not upgraded.
+Inst foo-foreign:amd64 [2.0] (4.0 unstable [amd64])
+Inst foo-foreign-breaker-3 (1.0 unstable [i386])
+Inst foo-foreign-provider (1.0 unstable [i386])
+Conf foo-foreign:amd64 (4.0 unstable [amd64])
+Conf foo-foreign-breaker-3 (1.0 unstable [i386])
+Conf foo-foreign-provider (1.0 unstable [i386])' aptget install foo-foreign-provider foo-foreign-breaker-3 -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:
+ foo-same-breaker-none : Breaks: foo-same
+E: Unable to correct problems, you have held broken packages.' aptget install foo-same-provider foo-same-breaker-none -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ foo-same-breaker-2 foo-same-provider
+0 upgraded, 2 newly installed, 0 to remove and 4 not upgraded.
+Inst foo-same-breaker-2 (1.0 unstable [i386])
+Inst foo-same-provider (1.0 unstable [i386])
+Conf foo-same-breaker-2 (1.0 unstable [i386])
+Conf foo-same-provider (1.0 unstable [i386])' aptget install foo-same-provider foo-same-breaker-2 -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following extra packages will be installed:
+ foo-same:amd64 foo-same
+The following NEW packages will be installed:
+ foo-same-breaker-3 foo-same-provider
+The following packages will be upgraded:
+ foo-same:amd64 foo-same
+2 upgraded, 2 newly installed, 0 to remove and 2 not upgraded.
+Inst foo-same:amd64 [2.0] (4.0 unstable [amd64]) [foo-same:amd64 on foo-same:i386] [foo-same:i386 on foo-same:amd64] [foo-same:i386 ]
+Inst foo-same [2.0] (4.0 unstable [i386])
+Conf foo-same:amd64 (4.0 unstable [amd64])
+Conf foo-same (4.0 unstable [i386])
+Inst foo-same-breaker-3 (1.0 unstable [i386])
+Inst foo-same-provider (1.0 unstable [i386])
+Conf foo-same-breaker-3 (1.0 unstable [i386])
+Conf foo-same-provider (1.0 unstable [i386])' aptget install foo-same-provider foo-same-breaker-3 -s
diff --git a/test/integration/test-ignore-provides-if-versioned-conflicts b/test/integration/test-ignore-provides-if-versioned-conflicts
new file mode 100755
index 000000000..44eafcff1
--- /dev/null
+++ b/test/integration/test-ignore-provides-if-versioned-conflicts
@@ -0,0 +1,150 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'i386' 'amd64'
+
+insertpackage 'unstable' 'unrlated' 'all' '1.0'
+
+insertinstalledpackage 'foo' 'i386' '2.0'
+insertpackage 'unstable' 'foo' 'i386' '4.0'
+insertpackage 'unstable' 'foo-provider' 'i386' '1.0' 'Provides: foo'
+insertpackage 'unstable' 'foo-breaker-3' 'i386' '1.0' 'Conflicts: foo (<< 3.0)'
+insertpackage 'unstable' 'foo-breaker-2' 'i386' '1.0' 'Conflicts: foo (<< 2.0)'
+insertpackage 'unstable' 'foo-breaker-none' 'i386' '1.0' 'Conflicts: foo'
+
+insertinstalledpackage 'foo-foreign' 'amd64' '2.0' 'Multi-Arch: foreign'
+insertpackage 'unstable' 'foo-foreign' 'amd64' '4.0' 'Multi-Arch: foreign'
+insertpackage 'unstable' 'foo-foreign-provider' 'i386' '1.0' 'Provides: foo-foreign'
+insertpackage 'unstable' 'foo-foreign-breaker-3' 'i386' '1.0' 'Conflicts: foo-foreign (<< 3.0)'
+insertpackage 'unstable' 'foo-foreign-breaker-2' 'i386' '1.0' 'Conflicts: foo-foreign (<< 2.0)'
+insertpackage 'unstable' 'foo-foreign-breaker-none' 'i386' '1.0' 'Conflicts: foo-foreign'
+
+insertinstalledpackage 'foo-same' 'i386,amd64' '2.0' 'Multi-Arch: same'
+insertpackage 'unstable' 'foo-same' 'i386,amd64' '4.0' 'Multi-Arch: same'
+insertpackage 'unstable' 'foo-same-provider' 'i386' '1.0' 'Provides: foo-same'
+insertpackage 'unstable' 'foo-same-breaker-3' 'i386' '1.0' 'Conflicts: foo-same (<< 3.0)'
+insertpackage 'unstable' 'foo-same-breaker-2' 'i386' '1.0' 'Conflicts: foo-same (<< 2.0)'
+insertpackage 'unstable' 'foo-same-breaker-none' 'i386' '1.0' 'Conflicts: foo-same'
+
+
+
+setupaptarchive
+
+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:
+ foo-breaker-none : Conflicts: foo
+E: Unable to correct problems, you have held broken packages.' aptget install foo-provider foo-breaker-none -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ foo-breaker-2 foo-provider
+0 upgraded, 2 newly installed, 0 to remove and 4 not upgraded.
+Inst foo-breaker-2 (1.0 unstable [i386])
+Inst foo-provider (1.0 unstable [i386])
+Conf foo-breaker-2 (1.0 unstable [i386])
+Conf foo-provider (1.0 unstable [i386])' aptget install foo-provider foo-breaker-2 -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following extra packages will be installed:
+ foo
+The following NEW packages will be installed:
+ foo-breaker-3 foo-provider
+The following packages will be upgraded:
+ foo
+1 upgraded, 2 newly installed, 0 to remove and 3 not upgraded.
+Inst foo [2.0] (4.0 unstable [i386])
+Inst foo-breaker-3 (1.0 unstable [i386])
+Inst foo-provider (1.0 unstable [i386])
+Conf foo (4.0 unstable [i386])
+Conf foo-breaker-3 (1.0 unstable [i386])
+Conf foo-provider (1.0 unstable [i386])' aptget install foo-provider foo-breaker-3 -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:
+ foo-foreign-breaker-none : Conflicts: foo-foreign
+E: Unable to correct problems, you have held broken packages.' aptget install foo-foreign-provider foo-foreign-breaker-none -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ foo-foreign-breaker-2 foo-foreign-provider
+0 upgraded, 2 newly installed, 0 to remove and 4 not upgraded.
+Inst foo-foreign-breaker-2 (1.0 unstable [i386])
+Inst foo-foreign-provider (1.0 unstable [i386])
+Conf foo-foreign-breaker-2 (1.0 unstable [i386])
+Conf foo-foreign-provider (1.0 unstable [i386])' aptget install foo-foreign-provider foo-foreign-breaker-2 -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following extra packages will be installed:
+ foo-foreign:amd64
+The following NEW packages will be installed:
+ foo-foreign-breaker-3 foo-foreign-provider
+The following packages will be upgraded:
+ foo-foreign:amd64
+1 upgraded, 2 newly installed, 0 to remove and 3 not upgraded.
+Inst foo-foreign:amd64 [2.0] (4.0 unstable [amd64])
+Inst foo-foreign-breaker-3 (1.0 unstable [i386])
+Inst foo-foreign-provider (1.0 unstable [i386])
+Conf foo-foreign:amd64 (4.0 unstable [amd64])
+Conf foo-foreign-breaker-3 (1.0 unstable [i386])
+Conf foo-foreign-provider (1.0 unstable [i386])' aptget install foo-foreign-provider foo-foreign-breaker-3 -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:
+ foo-same-breaker-none : Conflicts: foo-same
+E: Unable to correct problems, you have held broken packages.' aptget install foo-same-provider foo-same-breaker-none -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+ foo-same-breaker-2 foo-same-provider
+0 upgraded, 2 newly installed, 0 to remove and 4 not upgraded.
+Inst foo-same-breaker-2 (1.0 unstable [i386])
+Inst foo-same-provider (1.0 unstable [i386])
+Conf foo-same-breaker-2 (1.0 unstable [i386])
+Conf foo-same-provider (1.0 unstable [i386])' aptget install foo-same-provider foo-same-breaker-2 -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following extra packages will be installed:
+ foo-same:amd64 foo-same
+The following NEW packages will be installed:
+ foo-same-breaker-3 foo-same-provider
+The following packages will be upgraded:
+ foo-same:amd64 foo-same
+2 upgraded, 2 newly installed, 0 to remove and 2 not upgraded.
+Inst foo-same:amd64 [2.0] (4.0 unstable [amd64]) [foo-same:amd64 on foo-same:i386] [foo-same:i386 on foo-same:amd64] [foo-same:i386 ]
+Inst foo-same [2.0] (4.0 unstable [i386])
+Conf foo-same:amd64 (4.0 unstable [amd64])
+Conf foo-same (4.0 unstable [i386])
+Inst foo-same-breaker-3 (1.0 unstable [i386])
+Inst foo-same-provider (1.0 unstable [i386])
+Conf foo-same-breaker-3 (1.0 unstable [i386])
+Conf foo-same-provider (1.0 unstable [i386])' aptget install foo-same-provider foo-same-breaker-3 -s
diff --git a/test/integration/test-ubuntu-bug-346386-apt-get-update-paywall b/test/integration/test-ubuntu-bug-346386-apt-get-update-paywall
new file mode 100755
index 000000000..25cccf067
--- /dev/null
+++ b/test/integration/test-ubuntu-bug-346386-apt-get-update-paywall
@@ -0,0 +1,47 @@
+#!/bin/sh
+set -e
+
+ensure_n_canary_strings_in_dir() {
+ DIR=$1
+ CANARY_STRING=$2
+ EXPECTED_N=$3
+
+ msgtest "Testing for $EXPECTED_N canary strings '$CANARY_STRING' in in" "$DIR"
+
+ N=$(grep "$CANARY_STRING" $DIR/* 2>/dev/null |wc -l )
+ if [ "$N" = "$EXPECTED_N" ]; then
+ msgpass
+ return 0
+ else
+ msgfail "Expected $EXPECTED_N canaries, got $N"
+ return 1
+ fi
+}
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+
+setupenvironment
+configarchitecture 'native'
+
+insertpackage 'unstable' 'unrelated' 'all' '1.0' 'stable'
+
+setupaptarchive
+changetowebserver --simulate-paywall
+
+rm -rf rootdir/var/lib/apt/lists
+msgtest 'excpected failure of' 'apt-get update'
+aptget update -qq 2>/dev/null && msgfail || msgpass
+
+ensure_n_canary_strings_in_dir rootdir/var/lib/apt/lists/ 'ni ni ni' 0
+testequal 'partial' ls rootdir/var/lib/apt/lists/
+
+# again, this time with pre-existing files valid data
+for f in Release Release.gpg main_binary-amd64_Packages stable_main_source_Sources; do
+ echo "canary" > rootdir/var/lib/apt/lists/localhost:8080_dists_stable_${f}
+done
+
+# this will fail, the important part is that the canaries remain
+msgtest 'excpected failure of' 'apt-get update'
+aptget update -qq 2>/dev/null && msgfail || msgpass
+ensure_n_canary_strings_in_dir rootdir/var/lib/apt/lists/ 'canary' 4
diff --git a/test/integration/test-ubuntu-bug-835625-multiarch-lockstep-installed-first b/test/integration/test-ubuntu-bug-835625-multiarch-lockstep-installed-first
index a9a4069cf..269038d0f 100755
--- a/test/integration/test-ubuntu-bug-835625-multiarch-lockstep-installed-first
+++ b/test/integration/test-ubuntu-bug-835625-multiarch-lockstep-installed-first
@@ -14,7 +14,7 @@ insertpackage 'unstable' 'apt' 'i386' '2' 'Depends: libsame (= 2)'
setupaptarchive
-testequal 'Reading package lists...
+testequalor2 'Reading package lists...
Building dependency tree...
The following extra packages will be installed:
apt:i386 libsame:i386
@@ -28,4 +28,18 @@ Inst libsame (2 unstable [amd64]) [apt:i386 ]
Conf libsame:i386 (2 unstable [i386]) [apt:i386 ]
Conf libsame (2 unstable [amd64]) [apt:i386 ]
Inst apt:i386 [1] (2 unstable [i386])
+Conf apt:i386 (2 unstable [i386])' 'Reading package lists...
+Building dependency tree...
+The following extra packages will be installed:
+ apt:i386 libsame:i386
+The following NEW packages will be installed:
+ libsame
+The following packages will be upgraded:
+ apt:i386 libsame:i386
+2 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
+Inst apt:i386 [1] (2 unstable [i386]) []
+Inst libsame:i386 [1] (2 unstable [i386])
+Inst libsame (2 unstable [amd64])
+Conf libsame:i386 (2 unstable [i386])
+Conf libsame (2 unstable [amd64])
Conf apt:i386 (2 unstable [i386])' aptget install libsame:amd64 -s
diff --git a/test/integration/test-ubuntu-bug-985852-pre-depends-or-group-ordering b/test/integration/test-ubuntu-bug-985852-pre-depends-or-group-ordering
new file mode 100755
index 000000000..462acad00
--- /dev/null
+++ b/test/integration/test-ubuntu-bug-985852-pre-depends-or-group-ordering
@@ -0,0 +1,21 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'amd64'
+
+insertinstalledpackage 'custom' 'amd64' '1.0' 'Pre-Depends: grub-pc | grub'
+insertinstalledpackage 'grub' 'amd64' '1.0'
+insertpackage 'unstable' 'custom' 'amd64' '2.0' 'Pre-Depends: grub-pc | grub'
+
+setupaptarchive
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following packages will be upgraded:
+ custom
+1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
+Inst custom [1.0] (2.0 unstable [amd64])
+Conf custom (2.0 unstable [amd64])' aptget dist-upgrade -s