summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-08-21 19:59:33 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2015-08-27 11:24:07 +0200
commit9106d7c9692e91622a828f382b85fe592bfec81d (patch)
tree3e7fc8ff825046d9a2abb18d613b489c2493e1e4 /test
parent313f7d4ad08831de0a95a88ee4d62795aaad8a0c (diff)
just-in-time removal of broken essential packages
We deal with Conflicts in SmartUnpack in pretty much the same way, but Breaks weren't handled in SmartConfigure so that the remove was sheduled after the configuration of the package breaking the to-be-removed. Closes: 796070
Diffstat (limited to 'test')
-rwxr-xr-xtest/integration/test-bug-796070-downgrade-realpkg23
-rwxr-xr-xtest/integration/test-bug-796070-downgrade-simulate (renamed from test/integration/skip-bug-796070-downgrade)4
2 files changed, 25 insertions, 2 deletions
diff --git a/test/integration/test-bug-796070-downgrade-realpkg b/test/integration/test-bug-796070-downgrade-realpkg
new file mode 100755
index 000000000..3ad4fda3e
--- /dev/null
+++ b/test/integration/test-bug-796070-downgrade-realpkg
@@ -0,0 +1,23 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+
+setupenvironment
+configarchitecture 'i386'
+
+buildsimplenativepackage 'apt' 'all' '1.0.10.1' 'stable' 'Depends: libapt-pkg4.16 (>= 1.0.10.1)'
+buildsimplenativepackage 'libapt-pkg4.16' 'all' '1.0.10.1' 'stable' 'Breaks: apt (<< 0.9.4~), libapt-inst1.5 (<< 0.9.9~)'
+buildsimplenativepackage 'libapt-pkg5.0' 'all' '1.1~exp9' 'unstable' 'Breaks: apt (<< 1.1~exp4), libapt-inst1.5 (<< 0.9.9~)'
+buildsimplenativepackage 'apt' 'all' '1.1~exp9' 'unstable' 'Depends: libapt-pkg5.0'
+
+setupaptarchive
+
+# Check with the APT name, aka essential
+testsuccess aptget install apt -t stable -y
+testsuccess aptget dist-upgrade -y
+
+testsuccess aptget install apt/stable -y --allow-downgrades -o Debug::pkgPackageManager=1 #-o Debug::pkgDpkgPM=1
+testdpkginstalled apt libapt-pkg4.16
+testdpkgnotinstalled libapt-pkg5.0
diff --git a/test/integration/skip-bug-796070-downgrade b/test/integration/test-bug-796070-downgrade-simulate
index a435cfbf1..0b4817d39 100755
--- a/test/integration/skip-bug-796070-downgrade
+++ b/test/integration/test-bug-796070-downgrade-simulate
@@ -49,8 +49,8 @@ The following packages will be REMOVED:
The following packages will be DOWNGRADED:
eapt
0 upgraded, 0 newly installed, 1 downgraded, 1 to remove and 0 not upgraded.
+Inst eapt [1.1~exp9] (1.0.10.1 unstable [all]) [elibapt-pkg5.0:i386 on eapt:i386] [elibapt-pkg5.0:i386 ]
Remv elibapt-pkg5.0 [1.1~exp9]
-Inst eapt [1.1~exp9] (1.0.10.1 unstable [all])
Conf eapt (1.0.10.1 unstable [all])' apt install -s eapt=1.0.10.1
@@ -62,6 +62,6 @@ The following packages will be REMOVED:
The following packages will be DOWNGRADED:
apt
0 upgraded, 0 newly installed, 1 downgraded, 1 to remove and 0 not upgraded.
+Inst apt [1.1~exp9] (1.0.10.1 unstable [all]) [libapt-pkg5.0:i386 on apt:i386] [libapt-pkg5.0:i386 ]
Remv libapt-pkg5.0 [1.1~exp9]
-Inst apt [1.1~exp9] (1.0.10.1 unstable [all])
Conf apt (1.0.10.1 unstable [all])' apt install -s apt=1.0.10.1