summaryrefslogtreecommitdiff
path: root/test/integration
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration')
-rw-r--r--test/integration/framework75
-rwxr-xr-xtest/integration/skip-bug-602412-dequote-redirect36
-rwxr-xr-xtest/integration/test-bug-470115-new-and-tighten-recommends172
-rwxr-xr-xtest/integration/test-bug-612557-garbage-upgrade6
-rwxr-xr-xtest/integration/test-bug-618288-multiarch-same-lockstep32
-rwxr-xr-xtest/integration/test-handling-broken-orgroups108
-rwxr-xr-xtest/integration/test-ubuntu-bug-761175-remove-purge38
7 files changed, 436 insertions, 31 deletions
diff --git a/test/integration/framework b/test/integration/framework
index 013a71ec0..cc5af798c 100644
--- a/test/integration/framework
+++ b/test/integration/framework
@@ -145,6 +145,7 @@ setupenvironment() {
echo "DPKG::options:: \"--log=${TMPWORKINGDIRECTORY}/rootdir/var/log/dpkg.log\";" >> aptconfig.conf
echo 'quiet::NoUpdate "true";' >> aptconfig.conf
export LC_ALL=C
+ export PATH="${PATH}:/usr/local/sbin:/usr/sbin:/sbin"
msgdone "info"
}
@@ -218,6 +219,7 @@ buildsimplenativepackage() {
local DEPENDENCIES="$5"
local DESCRIPTION="$6"
local SECTION="${7:-others}"
+ local PRIORITY="${8:-optional}"
local DISTSECTION
if [ "$SECTION" = "$(echo "$SECTION" | cut -d'/' -f 2)" ]; then
DISTSECTION="main"
@@ -240,7 +242,7 @@ echo '$NAME says \"Hello!\"'" > ${BUILDDIR}/${NAME}
-- Joe Sixpack <joe@example.org> $(date -R)" > ${BUILDDIR}/debian/changelog
echo "Source: $NAME
Section: $SECTION
-Priority: optional
+Priority: $PRIORITY
Maintainer: Joe Sixpack <joe@example.org>
Standards-Version: 3.9.1
@@ -396,29 +398,34 @@ insertpackage() {
local ARCH="$3"
local VERSION="$4"
local DEPENDENCIES="$5"
- local ARCHS="$ARCH"
- if [ "$ARCHS" = "all" ]; then
- ARCHS="$(aptconfig dump | grep APT::Architecture | cut -d'"' -f 2 | sed '/^$/ d' | sort | uniq | tr '\n' ' ')"
- fi
- for BUILDARCH in $ARCHS; do
- local PPATH="aptarchive/dists/${RELEASE}/main/binary-${BUILDARCH}"
- mkdir -p $PPATH aptarchive/dists/${RELEASE}/main/source
- touch aptarchive/dists/${RELEASE}/main/source/Sources
- local FILE="${PPATH}/Packages"
- echo "Package: $NAME
-Priority: optional
+ local PRIORITY="${6:-optional}"
+ local ARCHS=""
+ for arch in $(echo "$ARCH" | sed -e 's#,#\n#g'); do
+ if [ "$arch" = "all" ]; then
+ ARCHS="$(aptconfig dump | grep APT::Architecture | cut -d'"' -f 2 | sed '/^$/ d' | sort | uniq | tr '\n' ' ')"
+ else
+ ARCHS="$arch"
+ fi
+ for BUILDARCH in $ARCHS; do
+ local PPATH="aptarchive/dists/${RELEASE}/main/binary-${BUILDARCH}"
+ mkdir -p $PPATH aptarchive/dists/${RELEASE}/main/source
+ touch aptarchive/dists/${RELEASE}/main/source/Sources
+ local FILE="${PPATH}/Packages"
+ echo "Package: $NAME
+Priority: $PRIORITY
Section: other
Installed-Size: 42
Maintainer: Joe Sixpack <joe@example.org>
-Architecture: $ARCH
+Architecture: $arch
Version: $VERSION
-Filename: pool/main/${NAME}/${NAME}_${VERSION}_${ARCH}.deb" >> $FILE
- test -z "$DEPENDENCIES" || echo "$DEPENDENCIES" >> $FILE
- echo "Description: an autogenerated dummy ${NAME}=${VERSION}/${RELEASE}
+Filename: pool/main/${NAME}/${NAME}_${VERSION}_${arch}.deb" >> $FILE
+ test -z "$DEPENDENCIES" || echo "$DEPENDENCIES" >> $FILE
+ echo "Description: an autogenerated dummy ${NAME}=${VERSION}/${RELEASE}
If you find such a package installed on your system,
YOU did something horribly wrong! They are autogenerated
und used only by testcases for APT and surf no other propose…
" >> $FILE
+ done
done
}
@@ -427,21 +434,24 @@ insertinstalledpackage() {
local ARCH="$2"
local VERSION="$3"
local DEPENDENCIES="$4"
+ local PRIORITY="${5:-optional}"
local FILE="rootdir/var/lib/dpkg/status"
- echo "Package: $NAME
+ for arch in $(echo "$ARCH" | sed -e 's#,#\n#g'); do
+ echo "Package: $NAME
Status: install ok installed
-Priority: optional
+Priority: $PRIORITY
Section: other
Installed-Size: 42
Maintainer: Joe Sixpack <joe@example.org>
-Architecture: $ARCH
+Architecture: $arch
Version: $VERSION" >> $FILE
- test -z "$DEPENDENCIES" || echo "$DEPENDENCIES" >> $FILE
- echo "Description: an autogenerated dummy ${NAME}=${VERSION}/${RELEASE}
+ test -z "$DEPENDENCIES" || echo "$DEPENDENCIES" >> $FILE
+ echo "Description: an autogenerated dummy ${NAME}=${VERSION}/installed
If you find such a package installed on your system,
YOU did something horribly wrong! They are autogenerated
und used only by testcases for APT and surf no other propose…
" >> $FILE
+ done
}
@@ -563,13 +573,22 @@ changetowebserver() {
if which weborf > /dev/null; then
weborf -xb aptarchive/ 2>&1 > /dev/null &
addtrap "kill $!;"
- local APTARCHIVE="file://$(readlink -f ./aptarchive)"
- for LIST in $(find rootdir/etc/apt/sources.list.d/ -name 'apt-test-*.list'); do
- sed -i $LIST -e "s#$APTARCHIVE#http://localhost:8080/#"
- done
- return 0
+ elif which lighttpd > /dev/null; then
+ echo "server.document-root = \"$(readlink -f ./aptarchive)\"
+server.port = 8080
+server.stat-cache-engine = \"disable\"" > lighttpd.conf
+ lighttpd -t -f lighttpd.conf >/dev/null || msgdie 'Can not change to webserver: our lighttpd config is invalid'
+ lighttpd -D -f lighttpd.conf 2>/dev/null >/dev/null &
+ addtrap "kill $!;"
+ else
+ msgdie 'You have to install weborf or lighttpd first'
+ return 1
fi
- return 1
+ local APTARCHIVE="file://$(readlink -f ./aptarchive)"
+ for LIST in $(find rootdir/etc/apt/sources.list.d/ -name 'apt-test-*.list'); do
+ sed -i $LIST -e "s#$APTARCHIVE#http://localhost:8080/#"
+ done
+ return 0
}
checkdiff() {
@@ -685,7 +704,7 @@ testmarkedauto() {
while [ -n "$1" ]; do echo "$1"; shift; done | sort > $COMPAREFILE
else
msgtest 'Test for correctly marked as auto-installed' 'no package'
- echo > $COMPAREFILE
+ echo -n > $COMPAREFILE
fi
aptmark showauto 2>&1 | checkdiff $COMPAREFILE - && msgpass || msgfail
}
diff --git a/test/integration/skip-bug-602412-dequote-redirect b/test/integration/skip-bug-602412-dequote-redirect
new file mode 100755
index 000000000..a63d36246
--- /dev/null
+++ b/test/integration/skip-bug-602412-dequote-redirect
@@ -0,0 +1,36 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'i386'
+
+if ! which lighttpd > /dev/null; then
+ msgdie 'You need lighttpd for this testcase, sorry…'
+ exit 1
+fi
+
+buildsimplenativepackage 'unrelated' 'all' '0.5~squeeze1' 'unstable'
+
+setupaptarchive
+
+echo "server.modules = ( \"mod_redirect\" )
+server.document-root = \"$(readlink -f ./aptarchive)\"
+server.port = 8080
+server.stat-cache-engine = \"disable\"
+url.redirect = ( \"^/pool/(.*)$\" => \"/newpool/\$1\" )" > lighttpd.conf
+
+mv aptarchive/pool aptarchive/newpool
+lighttpd -t -f lighttpd.conf >/dev/null || msgdie 'Can not change to webserver: our lighttpd config is invalid'
+lighttpd -D -f lighttpd.conf 2>/dev/null >/dev/null &
+addtrap "kill $!;"
+
+local APTARCHIVE="file://$(readlink -f ./aptarchive)"
+for LIST in $(find rootdir/etc/apt/sources.list.d/ -name 'apt-test-*.list'); do
+ sed -i $LIST -e "s#$APTARCHIVE#http://localhost:8080/#"
+done
+
+aptget update -qq || msgdie 'apt-get update failed'
+aptget install unrelated --download-only -qq || msgdie 'downloading package failed'
+
diff --git a/test/integration/test-bug-470115-new-and-tighten-recommends b/test/integration/test-bug-470115-new-and-tighten-recommends
new file mode 100755
index 000000000..6bc22ea7b
--- /dev/null
+++ b/test/integration/test-bug-470115-new-and-tighten-recommends
@@ -0,0 +1,172 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'i386'
+
+insertinstalledpackage 'cool' 'all' '1'
+insertinstalledpackage 'stuff' 'all' '1'
+insertinstalledpackage 'coolstuff' 'all' '1'
+
+insertpackage 'unstable' 'cool' 'all' '2'
+insertpackage 'unstable' 'stuff' 'all' '2'
+insertpackage 'unstable' 'coolstuff' 'all' '2'
+insertpackage 'unstable' 'super' 'all' '2'
+
+insertinstalledpackage 'tighten-cool' 'all' '1' 'Recommends: cool (>= 1)'
+insertpackage 'unstable' 'tighten-cool' 'all' '2' 'Recommends: cool (>= 2)'
+
+insertinstalledpackage 'tighten-coolorstuff' 'all' '1' 'Recommends: cool (>= 1) | stuff (>= 1)'
+insertpackage 'unstable' 'tighten-coolorstuff' 'all' '2' 'Recommends: stuff (>= 2) | cool (>= 2)'
+
+insertinstalledpackage 'tighten-coolorstuff2' 'all' '1' 'Recommends: cool (>= 1) | stuff (>= 1)'
+insertpackage 'unstable' 'tighten-coolorstuff2' 'all' '2' 'Recommends: stuff2 (>= 2) | cool (>= 2)'
+
+insertinstalledpackage 'newrec-cool' 'all' '1'
+insertpackage 'unstable' 'newrec-cool' 'all' '2' 'Recommends: cool (>= 2)'
+
+insertinstalledpackage 'newrec-super' 'all' '1'
+insertpackage 'unstable' 'newrec-super' 'all' '2' 'Recommends: super'
+
+insertinstalledpackage 'newrec-coolorstuff' 'all' '1'
+insertpackage 'unstable' 'newrec-coolorstuff' 'all' '2' 'Recommends: cool (>= 2) | stuff (>= 2)'
+
+insertinstalledpackage 'cool-gone' 'all' '1' 'Recommends: cool (>= 1) | stuff (>= 2)'
+insertpackage 'unstable' 'cool-gone' 'all' '2' 'Recommends: stuff (>= 2)'
+
+insertinstalledpackage 'super-overtake' 'all' '1' 'Recommends: cool | super, stuff | super'
+insertpackage 'unstable' 'super-overtake' 'all' '2' 'Recommends: stuff (>= 3) | super, super | cool (>= 2)'
+
+insertinstalledpackage 'upgrade-over-new' 'all' '1' 'Recommends: cool'
+insertpackage 'unstable' 'upgrade-over-new' 'all' '2' 'Recommends: cool (>= 2) | super'
+
+insertinstalledpackage 'now-satisfiable' 'all' '1' 'Recommends: cool (>= 3)'
+insertpackage 'unstable' 'now-satisfiable' 'all' '2' 'Recommends: cool (>= 2)'
+
+setupaptarchive
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following extra packages will be installed:
+ cool
+The following packages will be upgraded:
+ cool tighten-cool
+2 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
+Inst cool [1] (2 unstable [all])
+Inst tighten-cool [1] (2 unstable [all])
+Conf cool (2 unstable [all])
+Conf tighten-cool (2 unstable [all])' aptget install tighten-cool -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following extra packages will be installed:
+ stuff
+The following packages will be upgraded:
+ stuff tighten-coolorstuff
+2 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
+Inst stuff [1] (2 unstable [all])
+Inst tighten-coolorstuff [1] (2 unstable [all])
+Conf stuff (2 unstable [all])
+Conf tighten-coolorstuff (2 unstable [all])' aptget install tighten-coolorstuff -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following extra packages will be installed:
+ cool
+The following packages will be upgraded:
+ cool tighten-coolorstuff2
+2 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
+Inst cool [1] (2 unstable [all])
+Inst tighten-coolorstuff2 [1] (2 unstable [all])
+Conf cool (2 unstable [all])
+Conf tighten-coolorstuff2 (2 unstable [all])' aptget install tighten-coolorstuff2 -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following extra packages will be installed:
+ cool
+The following packages will be upgraded:
+ cool newrec-cool
+2 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
+Inst cool [1] (2 unstable [all])
+Inst newrec-cool [1] (2 unstable [all])
+Conf cool (2 unstable [all])
+Conf newrec-cool (2 unstable [all])' aptget install newrec-cool -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following extra packages will be installed:
+ super
+The following NEW packages will be installed:
+ super
+The following packages will be upgraded:
+ newrec-super
+1 upgraded, 1 newly installed, 0 to remove and 12 not upgraded.
+Inst newrec-super [1] (2 unstable [all])
+Inst super (2 unstable [all])
+Conf newrec-super (2 unstable [all])
+Conf super (2 unstable [all])' aptget install newrec-super -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following extra packages will be installed:
+ cool
+The following packages will be upgraded:
+ cool newrec-coolorstuff
+2 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
+Inst cool [1] (2 unstable [all])
+Inst newrec-coolorstuff [1] (2 unstable [all])
+Conf cool (2 unstable [all])
+Conf newrec-coolorstuff (2 unstable [all])' aptget install newrec-coolorstuff -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following extra packages will be installed:
+ stuff
+The following packages will be upgraded:
+ cool-gone stuff
+2 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
+Inst cool-gone [1] (2 unstable [all])
+Inst stuff [1] (2 unstable [all])
+Conf cool-gone (2 unstable [all])
+Conf stuff (2 unstable [all])' aptget install cool-gone -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following extra packages will be installed:
+ super
+The following NEW packages will be installed:
+ super
+The following packages will be upgraded:
+ super-overtake
+1 upgraded, 1 newly installed, 0 to remove and 12 not upgraded.
+Inst super (2 unstable [all])
+Inst super-overtake [1] (2 unstable [all])
+Conf super (2 unstable [all])
+Conf super-overtake (2 unstable [all])' aptget install super-overtake -s
+
+# if super would be in front, we would get a new here as it is new and
+# the first option in an or-group should be the preferred one…
+testequal 'Reading package lists...
+Building dependency tree...
+The following extra packages will be installed:
+ cool
+The following packages will be upgraded:
+ cool upgrade-over-new
+2 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
+Inst cool [1] (2 unstable [all])
+Inst upgrade-over-new [1] (2 unstable [all])
+Conf cool (2 unstable [all])
+Conf upgrade-over-new (2 unstable [all])' aptget install upgrade-over-new -s
+
+# the recommends wasn't used before so while we could do it now,
+# the user doesn't seem to need it so avoid upgrading it
+testequal 'Reading package lists...
+Building dependency tree...
+The following packages will be upgraded:
+ now-satisfiable
+1 upgraded, 0 newly installed, 0 to remove and 12 not upgraded.
+Inst now-satisfiable [1] (2 unstable [all])
+Conf now-satisfiable (2 unstable [all])' aptget install now-satisfiable -s
diff --git a/test/integration/test-bug-612557-garbage-upgrade b/test/integration/test-bug-612557-garbage-upgrade
index 3112e618c..8efd1687a 100755
--- a/test/integration/test-bug-612557-garbage-upgrade
+++ b/test/integration/test-bug-612557-garbage-upgrade
@@ -13,9 +13,9 @@ insertpackage 'unstable' 'libreoffice-common' 'all' '1:3.3.0-2' 'Conflicts: open
setupaptarchive
touch rootdir/var/lib/apt/extended_states
-aptmark markauto python-uno ure uno-libs3 openoffice.org-common openoffice.org-style-galaxy
+aptmark markauto python-uno openoffice.org-common
#aptmark unmarkauto openoffice.org-emailmerge
-testmarkedauto python-uno ure uno-libs3 openoffice.org-common openoffice.org-style-galaxy
+testmarkedauto python-uno openoffice.org-common
testequal 'Reading package lists...
Building dependency tree...
@@ -33,7 +33,7 @@ After this operation, 53.2 MB disk space will be freed.
E: Trivial Only specified but this is not a trivial operation.' aptget --trivial-only install python-uno
aptmark markauto openoffice.org-emailmerge
-testmarkedauto python-uno ure uno-libs3 openoffice.org-common openoffice.org-style-galaxy openoffice.org-emailmerge
+testmarkedauto python-uno openoffice.org-common openoffice.org-emailmerge
testequal 'Reading package lists...
Building dependency tree...
diff --git a/test/integration/test-bug-618288-multiarch-same-lockstep b/test/integration/test-bug-618288-multiarch-same-lockstep
new file mode 100755
index 000000000..7e384e428
--- /dev/null
+++ b/test/integration/test-bug-618288-multiarch-same-lockstep
@@ -0,0 +1,32 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'amd64' 'i386'
+
+insertinstalledpackage 'libsame' 'i386,amd64' '1' 'Multi-Arch: same' 'required'
+insertinstalledpackage 'apt' 'i386' '1' 'Depends: libsame (= 1)
+Essential: yes' 'required'
+insertinstalledpackage 'apt2' 'amd64' '1' 'Depends: libsame (= 1)
+Essential: yes' 'required'
+buildsimplenativepackage 'libsame' 'i386,amd64' '2' 'unstable' 'Multi-Arch: same' '' 'required'
+buildsimplenativepackage 'apt' 'i386' '2' 'unstable' 'Depends: libsame (= 2)' '' 'required'
+buildsimplenativepackage 'apt2' 'amd64' '2' 'unstable' 'Depends: libsame (= 2)' '' 'required'
+
+setupaptarchive
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following packages will be upgraded:
+ apt:i386 apt2 libsame libsame:i386
+4 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
+Inst libsame [1] (2 unstable [amd64]) [libsame:amd64 on libsame:i386] [libsame:i386 on libsame:amd64] [libsame:i386 apt2:amd64 ]
+Inst libsame:i386 [1] (2 unstable [i386]) [apt2:amd64 apt:i386 ]
+Conf libsame:i386 (2 unstable [i386]) [apt2:amd64 apt:i386 ]
+Conf libsame (2 unstable [amd64]) [apt2:amd64 apt:i386 ]
+Inst apt2 [1] (2 unstable [amd64]) [apt:i386 ]
+Conf apt2 (2 unstable [amd64]) [apt:i386 ]
+Inst apt:i386 [1] (2 unstable [i386])
+Conf apt:i386 (2 unstable [i386])' aptget dist-upgrade -s
diff --git a/test/integration/test-handling-broken-orgroups b/test/integration/test-handling-broken-orgroups
new file mode 100755
index 000000000..d88ad0000
--- /dev/null
+++ b/test/integration/test-handling-broken-orgroups
@@ -0,0 +1,108 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'i386'
+
+insertpackage 'unstable' 'cool' 'all' '1.0-1'
+insertpackage 'unstable' 'stuff' 'all' '1.0-1'
+insertpackage 'unstable' 'coolstuff' 'all' '1.0-1' 'Depends: cool | stuff'
+insertpackage 'unstable' 'coolstuff2' 'all' '1.0-1' 'Depends: cool2 | stuff'
+insertpackage 'unstable' 'coolstuff-broken' 'all' '1.0-1' 'Depends: cool2 | stuff2'
+insertpackage 'unstable' 'coolstuff-brokenrec' 'all' '1.0-1' 'Recommends: cool2 | stuff2'
+insertpackage 'unstable' 'coolstuff-conflict' 'all' '1.0-1' 'Depends: cool | stuff
+Conflicts: cool'
+insertpackage 'unstable' 'coolstuff-provided' 'all' '1.0-1' 'Depends: cool2 | stuff-abi'
+insertpackage 'unstable' 'extrastuff' 'all' '1.0-1' 'Provides: stuff-abi'
+
+insertpackage 'unstable' 'coolstuff-provided-broken' 'all' '1.0-1' 'Depends: cool2 | stuff-abi-2'
+insertpackage 'unstable' 'extrastuff' 'all' '1.0-1' 'Depends: stuff2
+Provides: stuff-abi-2'
+
+setupaptarchive
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following extra packages will be installed:
+ cool
+The following NEW packages will be installed:
+ cool coolstuff
+0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
+Inst cool (1.0-1 unstable [all])
+Inst coolstuff (1.0-1 unstable [all])
+Conf cool (1.0-1 unstable [all])
+Conf coolstuff (1.0-1 unstable [all])' aptget install coolstuff -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following extra packages will be installed:
+ stuff
+The following NEW packages will be installed:
+ coolstuff2 stuff
+0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
+Inst stuff (1.0-1 unstable [all])
+Inst coolstuff2 (1.0-1 unstable [all])
+Conf stuff (1.0-1 unstable [all])
+Conf coolstuff2 (1.0-1 unstable [all])' aptget install coolstuff2 -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+Some packages could not be installed. This may mean that you have
+requested an impossible situation or if you are using the unstable
+distribution that some required packages have not yet been created
+or been moved out of Incoming.
+The following information may help to resolve the situation:
+
+The following packages have unmet dependencies:
+ coolstuff-broken : Depends: cool2 but it is not installable or
+ stuff2 but it is not installable
+E: Broken packages' aptget install coolstuff-broken -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+Recommended packages:
+ cool2 stuff2
+The following NEW packages will be installed:
+ coolstuff-brokenrec
+0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
+Inst coolstuff-brokenrec (1.0-1 unstable [all])
+Conf coolstuff-brokenrec (1.0-1 unstable [all])' aptget install coolstuff-brokenrec -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following extra packages will be installed:
+ stuff
+The following NEW packages will be installed:
+ coolstuff-conflict stuff
+0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
+Inst stuff (1.0-1 unstable [all])
+Inst coolstuff-conflict (1.0-1 unstable [all])
+Conf stuff (1.0-1 unstable [all])
+Conf coolstuff-conflict (1.0-1 unstable [all])' aptget install coolstuff-conflict -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following extra packages will be installed:
+ extrastuff
+The following NEW packages will be installed:
+ coolstuff-provided extrastuff
+0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
+Inst extrastuff (1.0-1 unstable [all])
+Inst coolstuff-provided (1.0-1 unstable [all])
+Conf extrastuff (1.0-1 unstable [all])
+Conf coolstuff-provided (1.0-1 unstable [all])' aptget install coolstuff-provided -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+Some packages could not be installed. This may mean that you have
+requested an impossible situation or if you are using the unstable
+distribution that some required packages have not yet been created
+or been moved out of Incoming.
+The following information may help to resolve the situation:
+
+The following packages have unmet dependencies:
+ coolstuff-provided-broken : Depends: cool2 but it is not installable or
+ stuff-abi-2
+E: Broken packages' aptget install coolstuff-provided-broken -s
diff --git a/test/integration/test-ubuntu-bug-761175-remove-purge b/test/integration/test-ubuntu-bug-761175-remove-purge
new file mode 100755
index 000000000..93b67fc02
--- /dev/null
+++ b/test/integration/test-ubuntu-bug-761175-remove-purge
@@ -0,0 +1,38 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'i386'
+
+setupsimplenativepackage 'compiz-core' 'i386' '1.0' 'unstable'
+BUILDDIR='incoming/compiz-core-1.0'
+mkdir -p ${BUILDDIR}/debian/compiz-core/etc
+echo 'foo=bar;' > ${BUILDDIR}/compiz.conf
+echo 'compiz.conf /etc/compiz.conf' >> ${BUILDDIR}/debian/install
+buildpackage "$BUILDDIR" 'unstable' 'main'
+rm -rf "$BUILDDIR"
+
+setupaptarchive
+
+
+testdpkgnotinstalled compiz-core
+msgtest 'Install package' 'compiz-core'
+aptget install compiz-core -qq 2>&1 >/dev/null && msgpass || msgfail
+testdpkginstalled compiz-core
+
+msgtest 'Remove package' 'compiz-core'
+aptget remove compiz-core -y -qq 2>&1 >/dev/null && msgpass || msgfail
+testdpkgnotinstalled compiz-core
+
+msgtest 'Check that conffiles are still around for' 'compiz-core'
+dpkg -l compiz-core | grep '^rc' 2>&1 >/dev/null && msgpass || msgfail
+
+testequal 'Reading package lists...
+Building dependency tree...
+Reading state information...
+The following packages will be REMOVED:
+ compiz-core*
+0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
+Purg compiz-core' aptget purge compiz-core -s