4 TESTDIR
=$(readlink -f $(dirname $0))
7 configarchitecture
'i386'
9 insertpackage
'unstable,installed' 'libc6' 'i386' '1'
10 insertpackage
'unstable,installed' 'libselinux1' 'i386' '1'
12 cp rootdir
/var
/lib
/dpkg
/status dpkg.status
14 insertpackage
'unstable,installed' 'init' 'i386' '1' 'Depends: systemd-sysv
16 insertpackage
'unstable,installed' 'systemd-sysv' 'i386' '215-5+b1' 'Depends: systemd (= 215-5+b1)
18 # fun fact: we need these two pre-depends to get systemd ordered before systemd-sysv as
19 # many pre-depends mean: do early (as they are a pain, so get them out of the way early)
20 insertpackage
'unstable,installed' 'systemd' 'i386' '215-5+b1' 'Pre-Depends: libc6, libselinux1'
23 insertpackage
'unstable,installed' 'dependsA' 'i386' '1' 'Depends: dependsB
25 insertpackage
'unstable,installed' 'dependsB' 'i386' '1' 'Depends: dependsA
29 insertpackage
'unstable,installed' 'predependsA' 'i386' '1' 'Pre-Depends: predependsB
31 insertpackage
'unstable,installed' 'predependsB' 'i386' '1' 'Pre-Depends: predependsA
34 # pre-depends-to-depends loop
35 insertpackage
'unstable,installed' 'predependsdependsA' 'i386' '1' 'Pre-Depends: predependsdependsB
37 insertpackage
'unstable,installed' 'predependsdependsB' 'i386' '1' 'Depends: predependsdependsA
42 testsuccessequal
'Reading package lists...
43 Building dependency tree...
44 0 upgraded, 0 newly installed, 2 reinstalled, 0 to remove and 0 not upgraded.
45 Inst systemd [215-5+b1] (215-5+b1 unstable [i386])
46 Conf systemd (215-5+b1 unstable [i386])
47 Inst systemd-sysv [215-5+b1] (215-5+b1 unstable [i386])
48 Conf systemd-sysv (215-5+b1 unstable [i386])' aptget
install --reinstall systemd systemd
-sysv -s
50 testsuccessequal
'Reading package lists...
51 Building dependency tree...
52 0 upgraded, 0 newly installed, 2 reinstalled, 0 to remove and 0 not upgraded.
53 Inst dependsA [1] (1 unstable [i386])
54 Inst dependsB [1] (1 unstable [i386])
55 Conf dependsB (1 unstable [i386])
56 Conf dependsA (1 unstable [i386])' aptget
install --reinstall dependsA dependsB
-s
58 # there is a chance dpkg can actually do these, BUT this depends on the maintainerscripts (not) present
59 # which is very very risky to depend on (and apt doesn't know about that anyhow).
60 testfailure aptget
install --reinstall predependsA predependsB
-s -o Debug
::pkgPackageManager
=1
61 testequal
"E: Couldn't configure predependsA:i386, probably a dependency cycle." tail -n1 rootdir
/tmp
/testfailure.output
63 # FIXME: the error message is a catch all here, not like the one above
64 testfailure aptget
install --reinstall predependsdependsA predependsdependsB
-s -o Debug
::pkgPackageManager
=1
65 testequal
"E: Could not configure 'predependsdependsB:i386'. " tail -n1 rootdir
/tmp
/testfailure.output
68 msgmsg
'While we are at it, lets try these loops without reinstall as well'
69 cp dpkg.status rootdir
/var
/lib
/dpkg
/status
71 testsuccessequal
'Reading package lists...
72 Building dependency tree...
73 The following NEW packages will be installed:
75 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
76 Inst systemd (215-5+b1 unstable [i386])
77 Conf systemd (215-5+b1 unstable [i386])
78 Inst systemd-sysv (215-5+b1 unstable [i386])
79 Conf systemd-sysv (215-5+b1 unstable [i386])' aptget
install systemd systemd
-sysv -s
81 testsuccessequal
'Reading package lists...
82 Building dependency tree...
83 The following NEW packages will be installed:
85 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
86 Inst dependsA (1 unstable [i386]) []
87 Inst dependsB (1 unstable [i386])
88 Conf dependsB (1 unstable [i386])
89 Conf dependsA (1 unstable [i386])' aptget
install dependsA dependsB
-s
91 # there is a chance dpkg can actually do these, BUT this depends on the maintainerscripts (not) present
92 # which is very very risky to depend on (and apt doesn't know about that anyhow).
93 testfailure aptget
install predependsA predependsB
-s -o Debug
::pkgPackageManager
=1
94 testequal
"E: Couldn't configure predependsA:i386, probably a dependency cycle." tail -n1 rootdir
/tmp
/testfailure.output
96 # FIXME: the error message is a catch all here, not like the one above
97 testfailure aptget
install predependsdependsA predependsdependsB
-s -o Debug
::pkgPackageManager
=1
98 testequal
"E: Could not configure 'predependsdependsB:i386'. " tail -n1 rootdir
/tmp
/testfailure.output