summaryrefslogtreecommitdiff
path: root/test/integration/test-ubuntu-bug-761175-remove-purge
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-07-03 13:57:25 +0200
committerJulian Andres Klode <jak@debian.org>2016-10-05 12:02:19 +0200
commit6c36aa231b8dcde3b4698157a1ed1e7e4054a0ea (patch)
tree68f8e65daee32da082bcbb16602a25a591b1c9ca /test/integration/test-ubuntu-bug-761175-remove-purge
parentc614d66183639638f588422e2b0b3258d4f52323 (diff)
pass --force-remove-essential to dpkg only if needed
APT (usually) knows which package is essential or not, so we can avoid passing this force flag to dpkg unconditionally if the user hasn't chosen a non-default essential handling obscuring the information. (cherry picked from commit d3930f8716f439c229cd3d11813823d847a2ecff)
Diffstat (limited to 'test/integration/test-ubuntu-bug-761175-remove-purge')
-rwxr-xr-xtest/integration/test-ubuntu-bug-761175-remove-purge4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/integration/test-ubuntu-bug-761175-remove-purge b/test/integration/test-ubuntu-bug-761175-remove-purge
index aae394ad8..6ae1a04e8 100755
--- a/test/integration/test-ubuntu-bug-761175-remove-purge
+++ b/test/integration/test-ubuntu-bug-761175-remove-purge
@@ -30,6 +30,8 @@ runtests() {
testsuccess aptget install compiz-core-${PKG} -t "${RELEASE}" "$@"
testdpkginstalled compiz-core-${PKG}
+ testsuccess aptget remove compiz-core-${PKG} -y "$@" -o Debug::pkgDpkgPm=1
+ testfailure grep -- '--force-remove-essential' rootdir/tmp/testsuccess.output
testsuccess aptget remove compiz-core-${PKG} -y "$@"
testdpkgnotinstalled compiz-core-${PKG}
testdpkgstatus 'rc' '1' "compiz-core-${PKG}"
@@ -61,6 +63,8 @@ The following packages will be REMOVED:
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Purg compiz-core-${PKG}" aptget purge compiz-core-${PKG} -s "$@"
fi
+ testsuccess aptget purge compiz-core-${PKG} -y "$@" -o Debug::pkgDpkgPm=1
+ testfailure grep -- '--force-remove-essential' rootdir/tmp/testsuccess.output
testsuccess aptget purge compiz-core-${PKG} -y "$@"
echo -n '' > rootdir/var/lib/dpkg/available # dpkg -l < 1.16.2 reads the available file by default, where the package can be found
testequalor2 "dpkg-query: no packages found matching compiz-core-${PKG}" "No packages found matching compiz-core-${PKG}." dpkg -l compiz-core-${PKG}