diff options
author | Michael Vogt <mvo@debian.org> | 2014-05-29 12:14:42 +0200 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2014-05-29 12:14:42 +0200 |
commit | 1f46d14620a0b58a9239fa3faa59ba79a98f6c98 (patch) | |
tree | fd096e59115c48d15f27b1ae7376caf5ce2929dc /test/integration/test-essential-force-loopbreak | |
parent | e110d7bf5675f484c06b82f621ac98bedc464865 (diff) | |
parent | 55ef358b06854768cea247870e1d2f28a5955b90 (diff) |
Merge remote-tracking branch 'upstream/debian/sid' into debian/experimental
Conflicts:
test/integration/test-bug-747261-arch-specific-conflicts
Diffstat (limited to 'test/integration/test-essential-force-loopbreak')
-rwxr-xr-x | test/integration/test-essential-force-loopbreak | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/test/integration/test-essential-force-loopbreak b/test/integration/test-essential-force-loopbreak new file mode 100755 index 000000000..842dce61c --- /dev/null +++ b/test/integration/test-essential-force-loopbreak @@ -0,0 +1,51 @@ +#!/bin/sh +set -e + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework + +setupenvironment +configarchitecture 'amd64' + +insertinstalledpackage 'sysvinit' 'amd64' '1' 'Essential: yes' + +buildsimplenativepackage 'sysvinit' 'amd64' '2' 'sid' 'Pre-Depends: sysvinit-core | systemd-sysv +Essential: yes' +buildsimplenativepackage 'sysvinit-core' 'amd64' '2' 'sid' + +buildsimplenativepackage 'systemd-sysv' 'amd64' '2~conflict' 'sid-conflict' 'Conflicts: sysvinit (<< 2) +Breaks: sysvinit-core' + +buildsimplenativepackage 'systemd-sysv' 'amd64' '2~break' 'sid-break' 'Breaks: sysvinit (<< 2), sysvinit-core' + +setupaptarchive + +cp -a rootdir/var/lib/dpkg/status dpkg.status.backup + +testforcebreak() { + cp -a dpkg.status.backup rootdir/var/lib/dpkg/status + rm -f rootdir/var/lib/apt/extended_states + testequal 'Reading package lists... +Building dependency tree... +The following extra packages will be installed: + sysvinit +The following NEW packages will be installed: + systemd-sysv +The following packages will be upgraded: + sysvinit +1 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +E: This installation run will require temporarily removing the essential package sysvinit:amd64 due to a Conflicts/Pre-Depends loop. This is often bad, but if you really want to do it, activate the APT::Force-LoopBreak option. +E: Internal Error, Could not early remove sysvinit:amd64 (2)' aptget install systemd-sysv -t "$1" -s + # ensure that really nothing happens + testfailure aptget install systemd-sysv -y -t "$1" -o Debug::pkgPackageManager=1 + testdpkginstalled 'sysvinit' + testdpkgnotinstalled 'systemd-sysv' + + # with enough force however … + cp -a dpkg.status.backup rootdir/var/lib/dpkg/status + testsuccess aptget install systemd-sysv -y -t "$1" -o Debug::pkgPackageManager=1 -o APT::Force-LoopBreak=1 + testdpkginstalled 'sysvinit' 'systemd-sysv' +} + +testforcebreak 'sid-conflict' +testforcebreak 'sid-break' |