summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/integration/framework16
-rwxr-xr-xtest/integration/test-apt-get-autoremove (renamed from test/integration/test-autoremove)6
-rwxr-xr-xtest/integration/test-apt-get-changelog36
-rwxr-xr-xtest/integration/test-apt-get-download29
-rwxr-xr-xtest/integration/test-bug-549968-install-depends-of-not-installed26
-rwxr-xr-xtest/integration/test-bug-611729-mark-as-manual105
-rwxr-xr-xtest/integration/test-bug-612099-multiarch-conflicts209
-rwxr-xr-xtest/integration/test-changelog34
-rwxr-xr-xtest/integration/test-ubuntu-bug-365611-long-package-names11
9 files changed, 428 insertions, 44 deletions
diff --git a/test/integration/framework b/test/integration/framework
index fe1db14bc..e10709079 100644
--- a/test/integration/framework
+++ b/test/integration/framework
@@ -137,7 +137,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 +267,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"
}
@@ -624,8 +626,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 +636,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]'
diff --git a/test/integration/test-autoremove b/test/integration/test-apt-get-autoremove
index 1ca325b29..9dfab19f5 100755
--- a/test/integration/test-autoremove
+++ b/test/integration/test-apt-get-autoremove
@@ -19,8 +19,8 @@ Architecture: i386
Auto-Installed: 1
'
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,7 +42,7 @@ testdpkginstalled "po-debconf"
rm rootdir/etc/apt/apt.conf.d/00autoremove
aptget autoremove -y -qq 2>&1 > /dev/null
-testdpkgnoninstalled 'po-debconf'
+testdpkgnotinstalled 'po-debconf'
testfileequal 'rootdir/var/lib/apt/extended_states' ''
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-549968-install-depends-of-not-installed b/test/integration/test-bug-549968-install-depends-of-not-installed
new file mode 100755
index 000000000..864dd340a
--- /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 [all])
+Conf coolstuff (1.0 unstable [all])' aptget install coolstuff extracoolstuff- -o Debug::pkgDepCache::Marker=1 -s
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..9c1cd3d1b
--- /dev/null
+++ b/test/integration/test-bug-611729-mark-as-manual
@@ -0,0 +1,105 @@
+#!/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
+testfileequal 'rootdir/var/lib/apt/extended_states' ''
+
+aptget install a -y -qq 2>&1 > /dev/null
+testdpkginstalled a b
+testdpkgnotinstalled c
+testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: b
+Architecture: i386
+Auto-Installed: 1
+'
+
+aptget remove a -y -qq 2>&1 > /dev/null
+testdpkgnotinstalled a c
+testdpkginstalled b
+testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: b
+Architecture: i386
+Auto-Installed: 1
+'
+
+aptget install c -y -qq 2>&1 > /dev/null
+testdpkgnotinstalled a
+testdpkginstalled b c
+testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: b
+Architecture: i386
+Auto-Installed: 1
+'
+
+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
+testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: b
+Architecture: i386
+Auto-Installed: 1
+'
+
+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
+testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: b
+Architecture: i386
+Auto-Installed: 1
+'
+
+aptget install b --reinstall -y -qq 2>&1 > /dev/null
+testdpkgnotinstalled a
+testdpkginstalled b c
+testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: b
+Architecture: i386
+Auto-Installed: 1
+'
+
+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
+testfileequal 'rootdir/var/lib/apt/extended_states' 'Package: b
+Architecture: i386
+Auto-Installed: 0
+'
+
+aptget remove b -y -qq 2>&1 > /dev/null
+testdpkgnotinstalled a b c
+testfileequal 'rootdir/var/lib/apt/extended_states' ''
+
+aptget install a b -y -qq 2>&1 > /dev/null
+testdpkginstalled a b
+testdpkgnotinstalled c
+testfileequal 'rootdir/var/lib/apt/extended_states' ''
+
+aptget purge a b -y -qq 2>&1 > /dev/null
+testdpkgnotinstalled a b c
+testfileequal 'rootdir/var/lib/apt/extended_states' ''
+
+aptget install b c -y -qq 2>&1 > /dev/null
+testdpkgnotinstalled a
+testdpkginstalled b c
+testfileequal 'rootdir/var/lib/apt/extended_states' ''
+
+aptget install a -y -qq 2>&1 > /dev/null
+testdpkginstalled a b c
+testfileequal 'rootdir/var/lib/apt/extended_states' ''
diff --git a/test/integration/test-bug-612099-multiarch-conflicts b/test/integration/test-bug-612099-multiarch-conflicts
new file mode 100755
index 000000000..caac75db4
--- /dev/null
+++ b/test/integration/test-bug-612099-multiarch-conflicts
@@ -0,0 +1,209 @@
+#!/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
+
+# FIXME: libc6:i386 is installed, we are switching to libc6:all
+testequal 'Reading package lists...
+Building dependency tree...
+Reading state information...
+The following extra packages will be installed:
+ libc6
+The following NEW packages will be installed:
+ foobar libc6
+0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
+Inst libc6 (2.0 testing, testing [all])
+Inst foobar (1.0 stable [i386])
+Conf libc6 (2.0 testing, testing [all])
+Conf foobar (1.0 stable [i386])' aptget install foobar/stable libc6 -st testing
+
+# FIXME: libc6:i386 is installed, we are switching to libc6:all
+testequal 'Reading package lists...
+Building dependency tree...
+Reading state information...
+The following NEW packages will be installed:
+ libc6
+0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
+Inst libc6 (2.0 testing, testing [all])
+Conf libc6 (2.0 testing, testing [all])' 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 NEW packages will be installed:
+ foobar:amd64
+0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
+Inst foobar:amd64 (1.0 stable [amd64])
+Conf foobar:amd64 (1.0 stable [amd64])' aptget install foobar:amd64/stable -st testing
+
+
+# FIXME: the display is a strange (its a downgrade), but the handling itself correct
+testequal "Reading package lists...
+Building dependency tree...
+Reading state information...
+Selected version '1.0' (stable [i386]) for 'libc6'
+The following packages will be REMOVED:
+ libc6
+The following NEW packages will be installed:
+ libc6
+0 upgraded, 1 newly installed, 2 to remove and 0 not upgraded.
+Remv libc6 [2.0]
+Inst libc6 (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
+
+# FIXME: upgrade any to all as above
+testequal 'Reading package lists...
+Building dependency tree...
+Reading state information...
+The following NEW packages will be installed:
+ libc6-same
+0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
+Inst libc6-same (2.0 testing, testing [all])
+Conf libc6-same (2.0 testing, testing [all])' aptget upgrade -t testing -s
+aptget upgrade -y -qq 2>&1 > /dev/null
+testdpkginstalled libc6-same
+
+# FIXME: the display is a strange (its a downgrade), but the handling itself correct
+testequal "Reading package lists...
+Building dependency tree...
+Reading state information...
+Selected version '1.0' (stable [i386]) for 'libc6-same'
+The following packages will be REMOVED:
+ libc6-same
+The following NEW packages will be installed:
+ libc6-same
+0 upgraded, 1 newly installed, 2 to remove and 0 not upgraded.
+Remv libc6-same [2.0]
+Inst libc6-same (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 NEW packages will be installed:
+ foobar-same:amd64
+0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
+Inst foobar-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-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-ubuntu-bug-365611-long-package-names b/test/integration/test-ubuntu-bug-365611-long-package-names
new file mode 100755
index 000000000..28b55df3b
--- /dev/null
+++ b/test/integration/test-ubuntu-bug-365611-long-package-names
@@ -0,0 +1,11 @@
+#!/bin/sh
+set -e
+
+local 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)"