]>
Commit | Line | Data |
---|---|---|
0eb4af9d DK |
1 | #!/bin/sh |
2 | set -e | |
3 | ||
4 | TESTDIR=$(readlink -f $(dirname $0)) | |
5 | . $TESTDIR/framework | |
6 | ||
7 | setupenvironment | |
d91e3cfa | 8 | configarchitecture 'native' |
0eb4af9d | 9 | |
d91e3cfa | 10 | insertinstalledpackage 'sysvinit' 'native' '1' 'Essential: yes' |
0eb4af9d | 11 | |
d91e3cfa | 12 | buildsimplenativepackage 'sysvinit' 'native' '2' 'sid' 'Pre-Depends: sysvinit-core | systemd-sysv |
0eb4af9d | 13 | Essential: yes' |
d91e3cfa | 14 | buildsimplenativepackage 'sysvinit-core' 'native' '2' 'sid' |
0eb4af9d | 15 | |
d91e3cfa | 16 | buildsimplenativepackage 'systemd-sysv' 'native' '2~conflict' 'sid-conflict' 'Conflicts: sysvinit (<< 2) |
0eb4af9d DK |
17 | Breaks: sysvinit-core' |
18 | ||
d91e3cfa | 19 | buildsimplenativepackage 'systemd-sysv' 'native' '2~break' 'sid-break' 'Breaks: sysvinit (<< 2), sysvinit-core' |
0eb4af9d DK |
20 | |
21 | setupaptarchive | |
22 | ||
23 | cp -a rootdir/var/lib/dpkg/status dpkg.status.backup | |
24 | ||
25 | testforcebreak() { | |
26 | cp -a dpkg.status.backup rootdir/var/lib/dpkg/status | |
27 | rm -f rootdir/var/lib/apt/extended_states | |
25b86db1 | 28 | testfailureequal "Reading package lists... |
0eb4af9d | 29 | Building dependency tree... |
e7ebb414 | 30 | The following additional packages will be installed: |
0eb4af9d DK |
31 | sysvinit |
32 | The following NEW packages will be installed: | |
33 | systemd-sysv | |
34 | The following packages will be upgraded: | |
35 | sysvinit | |
36 | 1 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. | |
d91e3cfa | 37 | E: This installation run will require temporarily removing the essential package sysvinit:$(getarchitecture 'native') 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. |
eb197ed7 | 38 | E: Internal Error, Could not early remove sysvinit:$(dpkg --print-architecture) (2)" aptget install systemd-sysv -t "$1" -s |
0eb4af9d | 39 | # ensure that really nothing happens |
1df24acf | 40 | testfailure aptget install systemd-sysv -y -t "$1" |
0eb4af9d DK |
41 | testdpkginstalled 'sysvinit' |
42 | testdpkgnotinstalled 'systemd-sysv' | |
43 | ||
44 | # with enough force however … | |
45 | cp -a dpkg.status.backup rootdir/var/lib/dpkg/status | |
1df24acf | 46 | testsuccess aptget install systemd-sysv -y -t "$1" -o APT::Force-LoopBreak=1 |
0eb4af9d DK |
47 | testdpkginstalled 'sysvinit' 'systemd-sysv' |
48 | } | |
49 | ||
50 | testforcebreak 'sid-conflict' | |
51 | testforcebreak 'sid-break' |