summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2011-03-10 15:45:47 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2011-03-10 15:45:47 +0100
commit67da93c38eb3904b36537e025e2f63f77d830e20 (patch)
tree8ff57ccafb2f471fc97f97bfe8f0da11ca1eb7b1 /test
parentc9952021ba65db0581f6053cd6d6e8bf7d563e8f (diff)
parenta75b8cfeb6d7e2468b19534d5b5872c3885f0e1c (diff)
merged from debian-sid
Diffstat (limited to 'test')
-rwxr-xr-xtest/integration/create-test-data2
-rw-r--r--test/integration/framework39
-rwxr-xr-xtest/integration/run-tests9
-rw-r--r--test/integration/status-bug-612557-garbage-upgrade34
-rw-r--r--test/integration/status-bug-613420-new-garbage-dependency22
-rwxr-xr-xtest/integration/test-apt-get-autoremove (renamed from test/integration/test-autoremove)14
-rwxr-xr-xtest/integration/test-apt-get-changelog36
-rwxr-xr-xtest/integration/test-apt-get-download29
-rwxr-xr-xtest/integration/test-bug-254770-segfault-if-cache-not-buildable2
-rwxr-xr-xtest/integration/test-bug-330162-encoded-tar-header2
-rwxr-xr-xtest/integration/test-bug-549968-install-depends-of-not-installed26
-rwxr-xr-xtest/integration/test-bug-590438-broken-provides-thanks-to-remove-order8
-rwxr-xr-xtest/integration/test-bug-593360-modifiers-in-names18
-rwxr-xr-xtest/integration/test-bug-595691-empty-and-broken-archive-files8
-rwxr-xr-xtest/integration/test-bug-601961-install-info2
-rwxr-xr-xtest/integration/test-bug-604222-new-and-autoremove8
-rwxr-xr-xtest/integration/test-bug-604401-files-are-directories2
-rwxr-xr-xtest/integration/test-bug-605394-versioned-or-groups2
-rwxr-xr-xtest/integration/test-bug-611729-mark-as-manual84
-rwxr-xr-xtest/integration/test-bug-612099-multiarch-conflicts212
-rwxr-xr-xtest/integration/test-bug-612557-garbage-upgrade60
-rwxr-xr-xtest/integration/test-bug-613420-new-garbage-dependency37
-rwxr-xr-xtest/integration/test-changelog34
-rwxr-xr-xtest/integration/test-disappearing-packages4
-rwxr-xr-xtest/integration/test-release-candidate-switching32
-rwxr-xr-xtest/integration/test-ubuntu-bug-365611-long-package-names11
-rw-r--r--test/libapt/globalerror_test.cc32
-rwxr-xr-xtest/libapt/run-tests2
28 files changed, 671 insertions, 100 deletions
diff --git a/test/integration/create-test-data b/test/integration/create-test-data
index 581b62910..effbe1ea3 100755
--- a/test/integration/create-test-data
+++ b/test/integration/create-test-data
@@ -6,7 +6,7 @@ if [ -z "$1" -o -z "$2" ]; then
exit 1
fi
-local TESTDIR=$(readlink -f $(dirname $0))
+TESTDIR=$(readlink -f $(dirname $0))
. $TESTDIR/framework
BUILDDIRECTORY="${TESTDIR}/../../build/bin"
diff --git a/test/integration/framework b/test/integration/framework
index fe0ffb64f..71e7e476c 100644
--- a/test/integration/framework
+++ b/test/integration/framework
@@ -79,6 +79,7 @@ aptcache() { runapt apt-cache $*; }
aptget() { runapt apt-get $*; }
aptftparchive() { runapt apt-ftparchive $*; }
aptkey() { runapt apt-key $*; }
+aptmark() { runapt apt-mark $*; }
dpkg() {
$(which dpkg) --root=${TMPWORKINGDIRECTORY}/rootdir --force-not-root --force-bad-path --log=${TMPWORKINGDIRECTORY}/rootdir/var/log/dpkg.log $*
}
@@ -137,7 +138,6 @@ setupenvironment() {
echo "APT::Get::Show-User-Simulation-Note \"false\";" >> aptconfig.conf
echo "Dir::Bin::Methods \"${BUILDDIRECTORY}/methods\";" >> aptconfig.conf
echo "Dir::Bin::dpkg \"fakeroot\";" >> aptconfig.conf
- echo "Dir::Bin::methods \"${BUILDDIRECTORY}/methods\";" >> aptconfig.conf
echo "DPKG::options:: \"dpkg\";" >> aptconfig.conf
echo "DPKG::options:: \"--root=${TMPWORKINGDIRECTORY}/rootdir\";" >> aptconfig.conf
echo "DPKG::options:: \"--force-not-root\";" >> aptconfig.conf
@@ -268,11 +268,14 @@ Package: $NAME" > ${BUILDDIR}/debian/control
(cd ${BUILDDIR}; dpkg-gencontrol -DArchitecture=$ARCH)
(cd ${BUILDDIR}/debian/tmp; md5sum $(find usr/ -type f) > DEBIAN/md5sums)
- dpkg-deb --build ${BUILDDIR}/debian/tmp ${BUILDDIR}/.. > /dev/null
+ 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
+ mkdir -p ${BUILDDIR}/../${NAME}_${VERSION}
+ cp ${BUILDDIR}/debian/changelog ${BUILDDIR}/../${NAME}_${VERSION}/
+ cp ${BUILDDIR}/debian/changelog ${BUILDDIR}/../${NAME}_${VERSION}.changelog
rm -rf "${BUILDDIR}"
msgdone "info"
}
@@ -325,10 +328,10 @@ createaptftparchiveconfig() {
echo -n '";
};
Default {
- Packages::Compress ". gzip bzip2 lzma";
- Sources::Compress ". gzip bzip2 lzma";
- Contents::Compress ". gzip bzip2 lzma";
- Translation::Compress ". gzip bzip2 lzma";
+ Packages::Compress ". gzip bzip2 lzma xz";
+ Sources::Compress ". gzip bzip2 lzma xz";
+ Contents::Compress ". gzip bzip2 lzma xz";
+ Translation::Compress ". gzip bzip2 lzma xz";
LongDescription "false";
};
TreeDefault {
@@ -435,6 +438,7 @@ buildaptarchivefromfiles() {
cat ${line} | gzip > ${line}.gz
cat ${line} | bzip2 > ${line}.bz2
cat ${line} | lzma > ${line}.lzma
+ cat ${line} | xz > ${line}.xz
msgdone "info"
done
generatereleasefiles
@@ -624,8 +628,8 @@ testnopackage() {
testdpkginstalled() {
msgtest "Test for correctly installed package(s) with" "dpkg -l $*"
- local PKGS="$(dpkg -l $* | grep '^[a-z]' | grep '^[^i]' | wc -l)"
- if [ "$PKGS" != 0 ]; then
+ local PKGS="$(dpkg -l $* | grep '^i' | wc -l)"
+ if [ "$PKGS" != $# ]; then
echo $PKGS
dpkg -l $* | grep '^[a-z]'
msgfail
@@ -634,9 +638,9 @@ testdpkginstalled() {
msgpass
}
-testdpkgnoninstalled() {
- msgtest "Test for correctly non-installed package(s) with" "dpkg -l $*"
- local PKGS="$(dpkg -l $* | grep '^[a-z]' | grep '^[^u]' | wc -l)"
+testdpkgnotinstalled() {
+ msgtest "Test for correctly not-installed package(s) with" "dpkg -l $*"
+ local PKGS="$(dpkg -l $* 2> /dev/null | grep '^i' | wc -l)"
if [ "$PKGS" != 0 ]; then
echo
dpkg -l $* | grep '^[a-z]'
@@ -645,3 +649,16 @@ testdpkgnoninstalled() {
fi
msgpass
}
+
+testmarkedauto() {
+ local COMPAREFILE=$(mktemp)
+ addtrap "rm $COMPAREFILE;"
+ if [ -n "$1" ]; then
+ msgtest 'Test for correctly marked as auto-installed' "$*"
+ while [ -n "$1" ]; do echo "$1"; shift; done | sort > $COMPAREFILE
+ else
+ msgtest 'Test for correctly marked as auto-installed' 'no package'
+ echo > $COMPAREFILE
+ fi
+ aptmark showauto 2>&1 | checkdiff $COMPAREFILE - && msgpass || msgfail
+}
diff --git a/test/integration/run-tests b/test/integration/run-tests
index 7314e6b61..edac07dbf 100755
--- a/test/integration/run-tests
+++ b/test/integration/run-tests
@@ -1,6 +1,7 @@
#!/bin/sh
set -e
+FAIL=0
DIR=$(readlink -f $(dirname $0))
if [ "$1" = "-q" ]; then
export MSGLEVEL=2
@@ -13,8 +14,14 @@ for testcase in $(run-parts --list $DIR | grep '/test-'); do
else
echo "\033[1;32mRun Testcase \033[1;35m$(basename ${testcase})\033[0m"
fi
- ${testcase}
+ if ! ${testcase}; then
+ FAIL=$((FAIL+1))
+ echo "$(basename $testcase) ... FAIL"
+ fi
if [ "$1" = "-q" ]; then
echo
fi
done
+
+echo "failures: $FAIL"
+exit $FAIL
diff --git a/test/integration/status-bug-612557-garbage-upgrade b/test/integration/status-bug-612557-garbage-upgrade
new file mode 100644
index 000000000..7403d8cca
--- /dev/null
+++ b/test/integration/status-bug-612557-garbage-upgrade
@@ -0,0 +1,34 @@
+Package: python-uno
+Status: install ok installed
+Priority: optional
+Section: python
+Installed-Size: 2032
+Maintainer: Debian OpenOffice Team <debian-openoffice@lists.debian.org>
+Architecture: i386
+Source: openoffice.org
+Version: 1:3.2.1-11+squeeze2
+Description: Python-UNO bridge
+
+Package: openoffice.org-common
+Status: install ok installed
+Priority: optional
+Section: editors
+Installed-Size: 48356
+Maintainer: Debian OpenOffice Team <debian-openoffice@lists.debian.org>
+Architecture: all
+Source: openoffice.org
+Version: 1:3.2.1-11+squeeze2
+Description: office productivity suite -- arch-independent files
+
+Package: openoffice.org-emailmerge
+Status: install ok installed
+Priority: optional
+Section: editors
+Installed-Size: 1652
+Maintainer: Debian OpenOffice Team <debian-openoffice@lists.debian.org>
+Architecture: all
+Source: openoffice.org
+Version: 1:3.2.1-11+squeeze2
+Replaces: python-uno (<< 1:2.4.1-5)
+Pre-Depends: python-uno, openoffice.org-common
+Description: office productivity suite -- email mail merge
diff --git a/test/integration/status-bug-613420-new-garbage-dependency b/test/integration/status-bug-613420-new-garbage-dependency
new file mode 100644
index 000000000..166a3930f
--- /dev/null
+++ b/test/integration/status-bug-613420-new-garbage-dependency
@@ -0,0 +1,22 @@
+Package: openoffice.org-officebean
+Status: install ok installed
+Priority: optional
+Section: java
+Installed-Size: 1656
+Maintainer: Debian OpenOffice Team <debian-openoffice@lists.debian.org>
+Architecture: i386
+Source: openoffice.org
+Version: 1:3.2.1-11+squeeze2
+Depends: openoffice.org-core (= 1:3.2.1-11+squeeze2)
+Description: office productivity suite -- Java bean
+
+Package: openoffice.org-core
+Status: install ok installed
+Priority: optional
+Section: editors
+Installed-Size: 121724
+Maintainer: Debian OpenOffice Team <debian-openoffice@lists.debian.org>
+Architecture: i386
+Source: openoffice.org
+Version: 1:3.2.1-11+squeeze2
+Description: office productivity suite -- arch-dependent files
diff --git a/test/integration/test-autoremove b/test/integration/test-apt-get-autoremove
index 1ca325b29..c25ce3f58 100755
--- a/test/integration/test-autoremove
+++ b/test/integration/test-apt-get-autoremove
@@ -14,13 +14,10 @@ setupaptarchive
aptget install unrelated debhelper -qq 2>&1 > /dev/null
testdpkginstalled 'unrelated' 'debhelper' 'po-debconf'
-testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: po-debconf
-Architecture: i386
-Auto-Installed: 1
-'
+testmarkedauto 'po-debconf'
aptget remove debhelper -y -qq 2>&1 > /dev/null
-testdpkgnoninstalled 'debhelper'
-testdpkginstalled 'po-debconf unrelated'
+testdpkgnotinstalled 'debhelper'
+testdpkginstalled 'po-debconf' 'unrelated'
echo 'APT::NeverAutoRemove { "^debc.*nf$"; };' > rootdir/etc/apt/apt.conf.d/00autoremove
testequal 'Reading package lists...
@@ -42,9 +39,8 @@ testdpkginstalled "po-debconf"
rm rootdir/etc/apt/apt.conf.d/00autoremove
aptget autoremove -y -qq 2>&1 > /dev/null
-testdpkgnoninstalled 'po-debconf'
-
-testfileequal 'rootdir/var/lib/apt/extended_states' ''
+testdpkgnotinstalled 'po-debconf'
+testmarkedauto
sed -i rootdir/var/log/apt/history.log -e '/^Commandline: / d' -e '/^Start-Date: / d' -e '/^End-Date: / d'
testfileequal 'rootdir/var/log/apt/history.log' '
diff --git a/test/integration/test-apt-get-changelog b/test/integration/test-apt-get-changelog
new file mode 100755
index 000000000..0a80cc08c
--- /dev/null
+++ b/test/integration/test-apt-get-changelog
@@ -0,0 +1,36 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+
+setupenvironment
+configarchitecture "i386"
+
+buildsimplenativepackage 'apt' 'all' '1.0' 'stable'
+
+setupaptarchive
+changetowebserver
+aptget update -qq
+
+echo 'Apt::Changelogs::Server "http://localhost:8080/";' >> ./aptconfig.conf
+
+testequal "'http://localhost:8080//pool/apt_1.0/changelog'" aptget changelog apt --print-uris
+
+aptget changelog apt -qq > apt.changelog
+testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0/changelog)"
+rm apt.changelog
+
+aptget changelog apt -d -qq
+testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0/changelog)"
+rm apt.changelog aptarchive/pool/apt_1.0/changelog
+
+aptget changelog apt -qq -o APT::Changelogs::Server='http://not-on-the-main-server:8080/' > apt.changelog
+testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0.changelog)"
+rm apt.changelog
+
+aptget changelog apt -d -qq
+testfileequal 'apt.changelog' "$(cat aptarchive/pool/apt_1.0.changelog)"
+rm apt.changelog aptarchive/pool/apt_1.0.changelog
+
+testequal 'E: changelog download failed' aptget changelog apt -qq -o APT::Changelogs::Server='http://not-on-the-main-server:8080/'
diff --git a/test/integration/test-apt-get-download b/test/integration/test-apt-get-download
new file mode 100755
index 000000000..7db93c32f
--- /dev/null
+++ b/test/integration/test-apt-get-download
@@ -0,0 +1,29 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+
+setupenvironment
+configarchitecture "i386"
+
+buildsimplenativepackage 'apt' 'all' '1.0' 'stable'
+buildsimplenativepackage 'apt' 'all' '2.0' 'unstable'
+
+setupaptarchive
+
+testdownload() {
+ msgtest 'Test download of package file' $1
+ if [ -z "$3" ]; then
+ aptget download ${2}
+ else
+ aptget download ${2}/${3}
+ fi
+ test -f $1 && msgpass || msgfail
+}
+
+testdownload apt_1.0_all.deb apt stable
+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
diff --git a/test/integration/test-bug-254770-segfault-if-cache-not-buildable b/test/integration/test-bug-254770-segfault-if-cache-not-buildable
index 25c564daa..b9f45b131 100755
--- a/test/integration/test-bug-254770-segfault-if-cache-not-buildable
+++ b/test/integration/test-bug-254770-segfault-if-cache-not-buildable
@@ -1,7 +1,7 @@
#!/bin/sh
set -e
-local TESTDIR=$(readlink -f $(dirname $0))
+TESTDIR=$(readlink -f $(dirname $0))
. $TESTDIR/framework
setupenvironment
configarchitecture "i386"
diff --git a/test/integration/test-bug-330162-encoded-tar-header b/test/integration/test-bug-330162-encoded-tar-header
index fa01e0379..b3fae6bac 100755
--- a/test/integration/test-bug-330162-encoded-tar-header
+++ b/test/integration/test-bug-330162-encoded-tar-header
@@ -1,7 +1,7 @@
#!/bin/sh
set -e
-local TESTDIR=$(readlink -f $(dirname $0))
+TESTDIR=$(readlink -f $(dirname $0))
. $TESTDIR/framework
setupenvironment
configarchitecture "i386"
diff --git a/test/integration/test-bug-549968-install-depends-of-not-installed b/test/integration/test-bug-549968-install-depends-of-not-installed
new file mode 100755
index 000000000..871d236b9
--- /dev/null
+++ b/test/integration/test-bug-549968-install-depends-of-not-installed
@@ -0,0 +1,26 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture "i386"
+
+insertpackage 'unstable' 'libc6' 'all' '1.0'
+insertpackage 'unstable' 'coolstuff' 'all' '1.0' 'Recommends: extracoolstuff'
+insertpackage 'unstable' 'extracoolstuff' 'all' '1.0' 'Depends: libc6'
+
+setupaptarchive
+
+# We check the Markers here as the autoremove nuker will also
+# prevent it, but to late - its better to fail earlier
+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
+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
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 0f6493948..72de6eacb 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 [all])
-Conf coolstuff (1-1 localhost [all])
+ testequalor2 "Inst coolstuff (1-1 localhost [i386])
+Conf coolstuff (1-1 localhost [i386])
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 [all])
+Remv mawk [1.3.3-15]" "Inst coolstuff (1-1 localhost [i386])
Inst gawk2 (1:3.1.7.dfsg-5 localhost [i386])
-Conf coolstuff (1-1 localhost [all])
+Conf coolstuff (1-1 localhost [i386])
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 c12503b0d..c34b499b0 100755
--- a/test/integration/test-bug-593360-modifiers-in-names
+++ b/test/integration/test-bug-593360-modifiers-in-names
@@ -1,7 +1,7 @@
#!/bin/sh
set -e
-local TESTDIR=$(readlink -f $(dirname $0))
+TESTDIR=$(readlink -f $(dirname $0))
. $TESTDIR/framework
setupenvironment
configarchitecture "i386"
@@ -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 [all])
-Conf apt (0.8.8 localhost [all])' aptget install apt -s
+Inst apt (0.8.8 localhost [i386])
+Conf apt (0.8.8 localhost [i386])' 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 [all])
-Conf apt+ (0.8.8 localhost [all])' aptget install apt+ -s
+Inst apt+ (0.8.8 localhost [i386])
+Conf apt+ (0.8.8 localhost [i386])' 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 [all])
-Conf apt+ (0.8.8 localhost [all])' aptget install apt++ -s
+Inst apt+ (0.8.8 localhost [i386])
+Conf apt+ (0.8.8 localhost [i386])' 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 [all])
-Conf apt+ (0.8.8 localhost [all])' aptget purge apt++ -s
+Inst apt+ (0.8.8 localhost [i386])
+Conf apt+ (0.8.8 localhost [i386])' aptget purge apt++ -s
diff --git a/test/integration/test-bug-595691-empty-and-broken-archive-files b/test/integration/test-bug-595691-empty-and-broken-archive-files
index 2179ba03b..11dee0628 100755
--- a/test/integration/test-bug-595691-empty-and-broken-archive-files
+++ b/test/integration/test-bug-595691-empty-and-broken-archive-files
@@ -54,12 +54,14 @@ setupcompressor() {
gzip) COMPRESS="gz";;
bzip2) COMPRESS="bz2";;
lzma) COMPRESS="lzma";;
+ xz) COMPRESS="xz";;
esac
echo "Acquire::CompressionTypes::Order { \"${COMPRESS}\"; };
Dir::Bin::uncompressed \"/does/not/exist\";
Dir::Bin::gzip \"/does/not/exist\";
Dir::Bin::bzip2 \"/does/not/exist\";
-Dir::Bin::lzma \"/does/not/exist\";" > rootdir/etc/apt/apt.conf.d/00compressor
+Dir::Bin::lzma \"/does/not/exist\";
+Dir::Bin::xz \"/does/not/exist\";" > rootdir/etc/apt/apt.conf.d/00compressor
if [ -e "/bin/${COMPRESSOR}" ]; then
echo "Dir::Bin::${COMPRESSOR} \"/bin/${COMPRESSOR}\";" >> rootdir/etc/apt/apt.conf.d/00compressor
elif [ -e "/usr/bin/${COMPRESSOR}" ]; then
@@ -134,9 +136,9 @@ W: Failed to fetch ${COMPRESSOR}:$(readlink -f rootdir/var/lib/apt/lists/partial
E: Some index files failed to download. They have been ignored, or old ones used instead." "empty file Packages.$COMPRESS over http"
}
-for COMPRESSOR in 'gzip' 'bzip2' 'lzma'; do testoverfile $COMPRESSOR; done
+for COMPRESSOR in 'gzip' 'bzip2' 'lzma' 'xz'; do testoverfile $COMPRESSOR; done
# do the same again with http instead of file
changetowebserver
-for COMPRESSOR in 'gzip' 'bzip2' 'lzma'; do testoverhttp $COMPRESSOR; done
+for COMPRESSOR in 'gzip' 'bzip2' 'lzma' 'xz'; do testoverhttp $COMPRESSOR; done
diff --git a/test/integration/test-bug-601961-install-info b/test/integration/test-bug-601961-install-info
index b91bf3615..914910597 100755
--- a/test/integration/test-bug-601961-install-info
+++ b/test/integration/test-bug-601961-install-info
@@ -1,7 +1,7 @@
#!/bin/sh
set -e
-local TESTDIR=$(readlink -f $(dirname $0))
+TESTDIR=$(readlink -f $(dirname $0))
. $TESTDIR/framework
setupenvironment
configarchitecture "i386"
diff --git a/test/integration/test-bug-604222-new-and-autoremove b/test/integration/test-bug-604222-new-and-autoremove
index fa6dcdc70..2875d547a 100755
--- a/test/integration/test-bug-604222-new-and-autoremove
+++ b/test/integration/test-bug-604222-new-and-autoremove
@@ -1,15 +1,15 @@
#!/bin/sh
set -e
-local TESTDIR=$(readlink -f $(dirname $0))
+TESTDIR=$(readlink -f $(dirname $0))
. $TESTDIR/framework
setupenvironment
configarchitecture "i386"
setupaptarchive
-echo 'Package: libvtk5.4
-Auto-Installed: 1
-Architecture: i386' > rootdir/var/lib/apt/extended_states
+touch rootdir/var/lib/apt/extended_states
+aptmark markauto 'libvtk5.4'
+testmarkedauto 'libvtk5.4'
testequal "Reading package lists...
Building dependency tree...
diff --git a/test/integration/test-bug-604401-files-are-directories b/test/integration/test-bug-604401-files-are-directories
index 917fb106f..aae717a19 100755
--- a/test/integration/test-bug-604401-files-are-directories
+++ b/test/integration/test-bug-604401-files-are-directories
@@ -1,7 +1,7 @@
#!/bin/sh
set -e
-local TESTDIR=$(readlink -f $(dirname $0))
+TESTDIR=$(readlink -f $(dirname $0))
. $TESTDIR/framework
setupenvironment
configarchitecture "i386"
diff --git a/test/integration/test-bug-605394-versioned-or-groups b/test/integration/test-bug-605394-versioned-or-groups
index 0d7ad77f6..0f09d2927 100755
--- a/test/integration/test-bug-605394-versioned-or-groups
+++ b/test/integration/test-bug-605394-versioned-or-groups
@@ -1,7 +1,7 @@
#!/bin/sh
set -e
-local TESTDIR=$(readlink -f $(dirname $0))
+TESTDIR=$(readlink -f $(dirname $0))
. $TESTDIR/framework
setupenvironment
configarchitecture "i386"
diff --git a/test/integration/test-bug-611729-mark-as-manual b/test/integration/test-bug-611729-mark-as-manual
new file mode 100755
index 000000000..4e3e2fa0b
--- /dev/null
+++ b/test/integration/test-bug-611729-mark-as-manual
@@ -0,0 +1,84 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture "i386"
+
+buildsimplenativepackage "peace-dpkg" "all" "1.0" "stable"
+
+buildsimplenativepackage "a" "all" "1.0" "stable" "Depends: b"
+buildsimplenativepackage "b" "all" "1.0" "stable"
+buildsimplenativepackage "c" "all" "1.0" "stable" "Depends: b"
+
+setupaptarchive
+
+# dpkg freaks out if the last package is removed so keep one around
+aptget install peace-dpkg -y -qq 2>&1 > /dev/null
+testdpkginstalled peace-dpkg
+testmarkedauto
+
+aptget install a -y -qq 2>&1 > /dev/null
+testdpkginstalled a b
+testdpkgnotinstalled c
+testmarkedauto 'b'
+
+aptget remove a -y -qq 2>&1 > /dev/null
+testdpkgnotinstalled a c
+testdpkginstalled b
+testmarkedauto 'b'
+
+aptget install c -y -qq 2>&1 > /dev/null
+testdpkgnotinstalled a
+testdpkginstalled b c
+testmarkedauto 'b'
+
+testequal 'Reading package lists...
+Building dependency tree...
+Reading state information...
+b is already the newest version.
+0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget install b --only-upgrade
+testmarkedauto 'b'
+
+testequal 'Reading package lists...
+Building dependency tree...
+Reading state information...
+b is already the newest version.
+0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget install b -d
+testmarkedauto 'b'
+
+aptget install b --reinstall -y -qq 2>&1 > /dev/null
+testdpkgnotinstalled a
+testdpkginstalled b c
+testmarkedauto 'b'
+
+testequal 'Reading package lists...
+Building dependency tree...
+Reading state information...
+b is already the newest version.
+b set to manually installed.
+0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget install b
+testmarkedauto
+
+aptget remove b -y -qq 2>&1 > /dev/null
+testdpkgnotinstalled a b c
+testmarkedauto
+
+aptget install a b -y -qq 2>&1 > /dev/null
+testdpkginstalled a b
+testdpkgnotinstalled c
+testmarkedauto
+
+aptget purge a b -y -qq 2>&1 > /dev/null
+testdpkgnotinstalled a b c
+testmarkedauto
+
+aptget install b c -y -qq 2>&1 > /dev/null
+testdpkgnotinstalled a
+testdpkginstalled b c
+testmarkedauto
+
+aptget install a -y -qq 2>&1 > /dev/null
+testdpkginstalled a b c
+testmarkedauto
diff --git a/test/integration/test-bug-612099-multiarch-conflicts b/test/integration/test-bug-612099-multiarch-conflicts
new file mode 100755
index 000000000..6d09a4fa1
--- /dev/null
+++ b/test/integration/test-bug-612099-multiarch-conflicts
@@ -0,0 +1,212 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture "i386" "amd64"
+
+buildsimplenativepackage 'peace-dpkg' 'all' '1.0' 'stable'
+
+buildsimplenativepackage 'libc6' 'i386' '1.0' 'stable'
+buildsimplenativepackage 'libc6' 'amd64' '1.0' 'stable'
+buildsimplenativepackage 'libc6' 'all' '2.0' 'testing'
+
+buildsimplenativepackage 'foobar' 'i386' '1.0' 'stable' 'Depends: libc6'
+buildsimplenativepackage 'foobar' 'amd64' '1.0' 'stable' 'Depends: libc6'
+
+setupaptarchive
+
+aptget install peace-dpkg:i386 -y -qq 2>&1 > /dev/null
+testdpkginstalled peace-dpkg
+
+aptget install libc6:i386 -t stable -y -qq 2>&1 > /dev/null
+testdpkginstalled libc6
+testequal 'Reading package lists...
+Building dependency tree...
+Reading state information...
+The following packages will be REMOVED:
+ libc6
+The following NEW packages will be installed:
+ libc6:amd64
+0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
+Remv libc6 [1.0]
+Inst libc6:amd64 (1.0 stable [amd64])
+Conf libc6:amd64 (1.0 stable [amd64])' aptget install libc6:amd64 -s -t stable
+
+testequal 'Reading package lists...
+Building dependency tree...
+Reading state information...
+The following NEW packages will be installed:
+ foobar
+0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
+Inst foobar (1.0 stable [i386])
+Conf foobar (1.0 stable [i386])' aptget install foobar -st stable
+
+testequal 'Reading package lists...
+Building dependency tree...
+Reading state information...
+The following extra packages will be installed:
+ libc6:amd64
+The following packages will be REMOVED:
+ libc6
+The following NEW packages will be installed:
+ foobar:amd64 libc6:amd64
+0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
+Remv libc6 [1.0]
+Inst libc6:amd64 (1.0 stable [amd64])
+Inst foobar:amd64 (1.0 stable [amd64])
+Conf libc6:amd64 (1.0 stable [amd64])
+Conf foobar:amd64 (1.0 stable [amd64])' aptget install foobar:amd64 -st stable
+
+testequal 'Reading package lists...
+Building dependency tree...
+Reading state information...
+The following NEW packages will be installed:
+ foobar
+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 foobar (1.0 stable [i386])
+Conf libc6 (2.0 testing [i386])
+Conf foobar (1.0 stable [i386])' aptget install foobar/stable libc6 -st testing
+
+testequal 'Reading package lists...
+Building dependency tree...
+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
+aptget upgrade -y -qq 2>&1 > /dev/null
+testdpkginstalled libc6
+
+testequal 'Reading package lists...
+Building dependency tree...
+Reading state information...
+The following NEW packages will be installed:
+ foobar
+0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
+Inst foobar (1.0 stable [i386])
+Conf foobar (1.0 stable [i386])' aptget install foobar/stable -st testing
+
+testequal 'Reading package lists...
+Building dependency tree...
+Reading state information...
+The following extra packages will be installed:
+ libc6:amd64
+The following packages will be REMOVED:
+ libc6
+The following NEW packages will be installed:
+ foobar:amd64 libc6:amd64
+0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
+Remv libc6 [2.0]
+Inst libc6:amd64 (1.0 stable [amd64])
+Inst foobar:amd64 (1.0 stable [amd64])
+Conf libc6:amd64 (1.0 stable [amd64])
+Conf foobar:amd64 (1.0 stable [amd64])' aptget install foobar:amd64/stable -st testing
+
+
+testequal "Reading package lists...
+Building dependency tree...
+Reading state information...
+Selected version '1.0' (stable [i386]) for 'libc6'
+The following packages will be DOWNGRADED:
+ libc6
+0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.
+Inst libc6 [2.0] (1.0 stable [i386])
+Conf libc6 (1.0 stable [i386])" aptget install libc6/stable -s -q=0
+
+
+buildsimplenativepackage 'libc6-same' 'i386' '1.0' 'stable' 'Multi-Arch: same'
+buildsimplenativepackage 'libc6-same' 'amd64' '1.0' 'stable' 'Multi-Arch: same'
+buildsimplenativepackage 'libc6-same' 'all' '2.0' 'testing'
+
+buildsimplenativepackage 'foobar-same' 'i386' '1.0' 'stable' 'Depends: libc6-same'
+buildsimplenativepackage 'foobar-same' 'amd64' '1.0' 'stable' 'Depends: libc6-same'
+
+setupaptarchive
+
+aptget install libc6-same:i386 -t stable -y -qq 2>&1 > /dev/null
+testdpkginstalled libc6-same
+
+testequal 'Reading package lists...
+Building dependency tree...
+Reading state information...
+The following NEW packages will be installed:
+ foobar-same
+0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
+Inst foobar-same (1.0 stable [i386])
+Conf foobar-same (1.0 stable [i386])' aptget install foobar-same -st stable
+
+testequal 'Reading package lists...
+Building dependency tree...
+Reading state information...
+The following extra packages will be installed:
+ libc6-same:amd64
+The following NEW packages will be installed:
+ foobar-same:amd64 libc6-same:amd64
+0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
+Inst libc6-same:amd64 (1.0 stable [amd64])
+Inst foobar-same:amd64 (1.0 stable [amd64])
+Conf libc6-same:amd64 (1.0 stable [amd64])
+Conf foobar-same:amd64 (1.0 stable [amd64])' aptget install foobar-same:amd64 -st stable
+
+testequal 'Reading package lists...
+Building dependency tree...
+Reading state information...
+The following NEW packages will be installed:
+ libc6-same:amd64
+0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
+Inst libc6-same:amd64 (1.0 stable [amd64])
+Conf libc6-same:amd64 (1.0 stable [amd64])' aptget install libc6-same:amd64 -s -t stable
+
+# FIXME: We should test installing libc6-same:amd64 here, but dpkg doesn't allow it currently
+
+testequal 'Reading package lists...
+Building dependency tree...
+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
+aptget upgrade -y -qq 2>&1 > /dev/null
+testdpkginstalled libc6-same
+
+testequal "Reading package lists...
+Building dependency tree...
+Reading state information...
+Selected version '1.0' (stable [i386]) for 'libc6-same'
+The following packages will be DOWNGRADED:
+ libc6-same
+0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.
+Inst libc6-same [2.0] (1.0 stable [i386])
+Conf libc6-same (1.0 stable [i386])" aptget install libc6-same/stable -s -q=0
+
+testequal 'Reading package lists...
+Building dependency tree...
+Reading state information...
+The following NEW packages will be installed:
+ foobar-same
+0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
+Inst foobar-same (1.0 stable [i386])
+Conf foobar-same (1.0 stable [i386])' aptget install foobar-same/stable -st testing
+
+testequal 'Reading package lists...
+Building dependency tree...
+Reading state information...
+The following extra packages will be installed:
+ libc6-same:amd64
+The following packages will be REMOVED:
+ libc6-same
+The following NEW packages will be installed:
+ foobar-same:amd64 libc6-same:amd64
+0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
+Remv libc6-same [2.0]
+Inst libc6-same:amd64 (1.0 stable [amd64])
+Inst foobar-same:amd64 (1.0 stable [amd64])
+Conf libc6-same:amd64 (1.0 stable [amd64])
+Conf foobar-same:amd64 (1.0 stable [amd64])' aptget install foobar-same:amd64/stable -st testing
diff --git a/test/integration/test-bug-612557-garbage-upgrade b/test/integration/test-bug-612557-garbage-upgrade
new file mode 100755
index 000000000..3112e618c
--- /dev/null
+++ b/test/integration/test-bug-612557-garbage-upgrade
@@ -0,0 +1,60 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture "i386"
+
+insertpackage 'unstable' 'unrelated' 'all' '1:3.3.0-2'
+insertpackage 'unstable' 'python-uno' 'all' '1:3.3.0-2' 'Depends: libreoffice-common'
+insertpackage 'unstable' 'libreoffice-common' 'all' '1:3.3.0-2' 'Conflicts: openoffice.org-common'
+
+setupaptarchive
+
+touch rootdir/var/lib/apt/extended_states
+aptmark markauto python-uno ure uno-libs3 openoffice.org-common openoffice.org-style-galaxy
+#aptmark unmarkauto openoffice.org-emailmerge
+testmarkedauto python-uno ure uno-libs3 openoffice.org-common openoffice.org-style-galaxy
+
+testequal 'Reading package lists...
+Building dependency tree...
+Reading state information...
+The following extra packages will be installed:
+ libreoffice-common
+The following packages will be REMOVED:
+ openoffice.org-common openoffice.org-emailmerge
+The following NEW packages will be installed:
+ libreoffice-common
+The following packages will be upgraded:
+ python-uno
+1 upgraded, 1 newly installed, 2 to remove and 0 not upgraded.
+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
+
+testequal 'Reading package lists...
+Building dependency tree...
+Reading state information...
+The following extra packages will be installed:
+ libreoffice-common
+The following packages will be REMOVED:
+ openoffice.org-common openoffice.org-emailmerge
+The following NEW packages will be installed:
+ libreoffice-common
+The following packages will be upgraded:
+ python-uno
+1 upgraded, 1 newly installed, 2 to remove and 0 not upgraded.
+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
+
+testequal 'Reading package lists...
+Building dependency tree...
+Reading state information...
+The following packages will be REMOVED:
+ openoffice.org-common openoffice.org-emailmerge python-uno
+0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
+After this operation, 53.3 MB disk space will be freed.
+E: Trivial Only specified but this is not a trivial operation.' aptget autoremove --trivial-only
diff --git a/test/integration/test-bug-613420-new-garbage-dependency b/test/integration/test-bug-613420-new-garbage-dependency
new file mode 100755
index 000000000..34cf38cbc
--- /dev/null
+++ b/test/integration/test-bug-613420-new-garbage-dependency
@@ -0,0 +1,37 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture "i386"
+
+insertpackage 'unstable' 'libreoffice' 'all' '1:3.3.1~rc1-2' 'Depends: libreoffice-core'
+insertpackage 'unstable' 'libreoffice-core' 'all' '1:3.3.1~rc1-2' 'Conflicts: openoffice.org-core'
+insertpackage 'unstable' 'libreoffice-officebean' 'all' '1:3.3.1~rc1-2' 'Depends: libreoffice-core'
+insertpackage 'unstable' 'openoffice.org-officebean' 'all' '1:3.3.0-5' 'Depends: libreoffice-officebean'
+
+
+setupaptarchive
+
+touch rootdir/var/lib/apt/extended_states
+aptmark markauto openoffice.org-officebean
+testmarkedauto openoffice.org-officebean
+
+testequal "Reading package lists...
+Building dependency tree...
+Reading state information...
+The following packages were automatically installed and are no longer required:
+ openoffice.org-officebean libreoffice-officebean
+Use 'apt-get autoremove' to remove them.
+The following extra packages will be installed:
+ libreoffice-core libreoffice-officebean openoffice.org-officebean
+The following packages will be REMOVED:
+ openoffice.org-core
+The following NEW packages will be installed:
+ libreoffice libreoffice-core libreoffice-officebean
+The following packages will be upgraded:
+ openoffice.org-officebean
+1 upgraded, 3 newly installed, 1 to remove and 0 not upgraded.
+After this operation, 126 MB disk space will be freed.
+E: Trivial Only specified but this is not a trivial operation." aptget install libreoffice --trivial-only
diff --git a/test/integration/test-changelog b/test/integration/test-changelog
deleted file mode 100755
index 292df6e32..000000000
--- a/test/integration/test-changelog
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/sh
-set -e
-
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
-
-setupenvironment
-configarchitecture "i386"
-
-# this will be valid until ubuntu lucid is EOL (04/2015)
-pkgchangelogtest="Package: apt
-Architecture: i386
-Version: 0.7.25.3ubuntu7
-Filename: pool/main/a/apt/apt_0.7.25.3ubuntu7_i386.deb
-Section: admin
-"
-cat <<-EOF >aptarchive/Packages
-$pkgchangelogtest
-EOF
-
-setupaptarchive
-
-echo "Apt::Changelogs::Server \"http://changelogs.ubuntu.com/\";" >> ./aptconfig.conf
-msgnmsg "apt-get changelog: "
-aptget changelog apt -qq > downloaded-changelog
-expected="apt (0.7.25.3ubuntu7) lucid; urgency=low"
-got="$(head -n1 downloaded-changelog)"
-if [ -s downloaded-changelog ] && [ "$got" = "$expected" ]; then
- msgpass
-else
- msgfail
- msgwarn "$got != $expected"
-fi
-
diff --git a/test/integration/test-disappearing-packages b/test/integration/test-disappearing-packages
index 12d215d7a..b5d565c2f 100755
--- a/test/integration/test-disappearing-packages
+++ b/test/integration/test-disappearing-packages
@@ -31,7 +31,7 @@ setupaptarchive
aptget install old-pkg=1.0 --trivial-only -qq 2>&1 > /dev/null
-testfileequal "rootdir/var/lib/apt/extended_states" "" # old-pkg is manual installed
+testmarkedauto # old-pkg is manual installed
local CMD="aptget dist-upgrade -y -q=0"
msgtest "Test for equality of" "$CMD"
@@ -51,4 +51,4 @@ Install: new-pkg:i386 (2.0, automatic)
Upgrade: old-pkg:i386 (1.0, 2.0)
Disappeared: old-pkg (1.0)"
-testfileequal "rootdir/var/lib/apt/extended_states" "" # new-pkg should have get the manual flag from old-pkg
+testmarkedauto # new-pkg should have get the manual flag from old-pkg
diff --git a/test/integration/test-release-candidate-switching b/test/integration/test-release-candidate-switching
index 5736945ab..b79828a9e 100755
--- a/test/integration/test-release-candidate-switching
+++ b/test/integration/test-release-candidate-switching
@@ -1,7 +1,7 @@
#!/bin/sh
set -e
-local TESTDIR=$(readlink -f $(dirname $0))
+TESTDIR=$(readlink -f $(dirname $0))
. $TESTDIR/framework
setupenvironment
configarchitecture "i386"
@@ -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 [all]) for 'amarok-common' because of 'amarok'
+Selected version '2.3.2-2+exp' (experimental [i386]) 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 [all]) for 'amarok-common' because of '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 [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 [all]) for 'amarok-common' because of 'amarok'
+Selected version '2.3.2-2+exp' (experimental [i386]) 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 [all]) for 'amarok-common' because of 'amarok-higher'
+Selected version '2.3.2-2+exp' (experimental [i386]) 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 [all]) for 'amarok-common' because of '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 [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 [all]) for 'amarok-common' because of 'amarok-xine'
+Selected version '2.3.2-2+exp' (experimental [i386]) 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 [all]) for 'amarok-common' because of 'amarok-xine2'
+Selected version '2.3.2-2+exp' (experimental [i386]) 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 [all]) for 'amarok-common' because of 'amarok-xine3'
+Selected version '2.3.2-2+exp' (experimental [i386]) 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 [all]) for 'intermediatepkg' because of 'phonon-backend-xine3'
+Selected version '2.0' (experimental [i386]) 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 [all]) for 'amarok-common' because of 'amarok-xine4'
+Selected version '2.3.2-2+exp' (experimental [i386]) 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 [all]) for 'amarok-common' because of 'amarok-broken'
+Selected version '2.3.2-2+exp' (experimental [i386]) 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 [all]) for 'amarok-common' because of '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 [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 [all]) for 'amarok-common' because of 'amarok-recommends'
+Selected version '2.3.2-2+exp' (experimental [i386]) 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 [all]) for 'amarok-common' because of 'amarok-recommends2'
+Selected version '2.3.2-2+exp' (experimental [i386]) 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 [all]) for 'uninstallablepkg'
+Selected version '1.0' (experimental [i386]) 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
diff --git a/test/integration/test-ubuntu-bug-365611-long-package-names b/test/integration/test-ubuntu-bug-365611-long-package-names
new file mode 100755
index 000000000..894c8dc97
--- /dev/null
+++ b/test/integration/test-ubuntu-bug-365611-long-package-names
@@ -0,0 +1,11 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture "i386"
+setupaptarchive
+
+aptget install $(for i in $(seq 0 1000); do echo -n 'a'; done) 2> longpackagename.log > /dev/null || true
+testfileequal 'longpackagename.log' "E: Unable to locate package $(for i in $(seq 0 1000); do echo -n 'a'; done)"
diff --git a/test/libapt/globalerror_test.cc b/test/libapt/globalerror_test.cc
index b2752255f..7d933f5a8 100644
--- a/test/libapt/globalerror_test.cc
+++ b/test/libapt/globalerror_test.cc
@@ -2,6 +2,7 @@
#include "assert.h"
#include <string>
+#include <errno.h>
int main(int argc,char *argv[])
{
@@ -73,5 +74,36 @@ int main(int argc,char *argv[])
equals(text, "A Warning");
equals(_error->empty(), true);
+ errno = 0;
+ equals(_error->Errno("errno", "%s horrible %s %d times", "Something", "happend", 2), false);
+ equals(_error->empty(), false);
+ equals(_error->PendingError(), true);
+ equals(_error->PopMessage(text), true);
+ equals(_error->PendingError(), false);
+ equals(text, "Something horrible happend 2 times - errno (0: Success)");
+ equals(_error->empty(), true);
+
+ std::string longText;
+ for (size_t i = 0; i < 500; ++i)
+ longText.append("a");
+ equals(_error->Error("%s horrible %s %d times", longText.c_str(), "happend", 2), false);
+ equals(_error->PopMessage(text), true);
+ equals(text, std::string(longText).append(" horrible happend 2 times"));
+
+ equals(_error->Errno("errno", "%s horrible %s %d times", longText.c_str(), "happend", 2), false);
+ equals(_error->PopMessage(text), true);
+ equals(text, std::string(longText).append(" horrible happend 2 times - errno (0: Success)"));
+
+ equals(_error->Warning("Репозиторий не обновлён и будут %d %s", 4, "test"), false);
+ equals(_error->PopMessage(text), false);
+ equals(text, "Репозиторий не обновлён и будут 4 test");
+
+ longText.clear();
+ for (size_t i = 0; i < 50; ++i)
+ longText.append("РезийбёбAZ");
+ equals(_error->Warning(longText.c_str()), false);
+ equals(_error->PopMessage(text), false);
+ equals(text, longText);
+
return 0;
}
diff --git a/test/libapt/run-tests b/test/libapt/run-tests
index a66de386d..4b71c2097 100755
--- a/test/libapt/run-tests
+++ b/test/libapt/run-tests
@@ -1,7 +1,7 @@
#!/bin/sh
set -e
-local DIR=$(readlink -f $(dirname $0))
+DIR=$(readlink -f $(dirname $0))
echo "Compiling the tests …"
test -d "$DIR/../../build/obj/test/libapt/" || mkdir -p "$DIR/../../build/obj/test/libapt/"
(cd $DIR && make)