]> git.saurik.com Git - apt.git/blame_incremental - test/integration/test-bug-796070-downgrade-simulate
run update post-invokes even on (partial) failures
[apt.git] / test / integration / test-bug-796070-downgrade-simulate
... / ...
CommitLineData
1#!/bin/sh
2set -e
3
4TESTDIR="$(readlink -f "$(dirname "$0")")"
5. "$TESTDIR/framework"
6
7setupenvironment
8configarchitecture 'i386'
9
10insertpackage 'unstable' 'apt' 'all' '1.0.10.1' 'Depends: libapt-pkg4.16 (>= 1.0.10.1)'
11insertinstalledpackage 'libapt-pkg4.16' 'all' '1.0.10.1' 'Breaks: apt (<< 0.9.4~), libapt-inst1.5 (<< 0.9.9~)'
12insertinstalledpackage 'libapt-pkg5.0' 'all' '1.1~exp9' 'Breaks: apt (<< 1.1~exp4), libapt-inst1.5 (<< 0.9.9~)'
13insertinstalledpackage 'apt' 'all' '1.1~exp9' 'Depends: libapt-pkg5.0'
14
15insertpackage 'unstable' 'napt' 'all' '1.0.10.1' 'Depends: nlibapt-pkg4.16 (>= 1.0.10.1)'
16insertinstalledpackage 'nlibapt-pkg4.16' 'all' '1.0.10.1' 'Breaks: napt (<< 0.9.4~), nlibapt-inst1.5 (<< 0.9.9~)'
17insertinstalledpackage 'nlibapt-pkg5.0' 'all' '1.1~exp9' 'Breaks: napt (<< 1.1~exp4), nlibapt-inst1.5 (<< 0.9.9~)'
18insertinstalledpackage 'napt' 'all' '1.1~exp9' 'Depends: nlibapt-pkg5.0'
19
20insertpackage 'unstable' 'eapt' 'all' '1.0.10.1' 'Depends: elibapt-pkg4.16 (>= 1.0.10.1)
21Essential: yes'
22insertinstalledpackage 'elibapt-pkg4.16' 'all' '1.0.10.1' 'Breaks: eapt (<< 0.9.4~), elibapt-inst1.5 (<< 0.9.9~)'
23insertinstalledpackage 'elibapt-pkg5.0' 'all' '1.1~exp9' 'Breaks: eapt (<< 1.1~exp4), elibapt-inst1.5 (<< 0.9.9~)'
24insertinstalledpackage 'eapt' 'all' '1.1~exp9' 'Depends: elibapt-pkg5.0
25Essential: yes'
26
27
28setupaptarchive
29
30
31# Check with a normal package
32testsuccessequal 'Reading package lists...
33Building dependency tree...
34The following packages will be REMOVED:
35 nlibapt-pkg5.0
36The following packages will be DOWNGRADED:
37 napt
380 upgraded, 0 newly installed, 1 downgraded, 1 to remove and 0 not upgraded.
39Remv nlibapt-pkg5.0 [1.1~exp9] [napt:i386 ]
40Inst napt [1.1~exp9] (1.0.10.1 unstable [all])
41Conf napt (1.0.10.1 unstable [all])' apt install -s napt=1.0.10.1
42
43
44# Check with Essential
45testsuccessequal 'Reading package lists...
46Building dependency tree...
47The following packages will be REMOVED:
48 elibapt-pkg5.0
49The following packages will be DOWNGRADED:
50 eapt
510 upgraded, 0 newly installed, 1 downgraded, 1 to remove and 0 not upgraded.
52Inst eapt [1.1~exp9] (1.0.10.1 unstable [all]) [elibapt-pkg5.0:i386 on eapt:i386] [elibapt-pkg5.0:i386 ]
53Remv elibapt-pkg5.0 [1.1~exp9]
54Conf eapt (1.0.10.1 unstable [all])' apt install -s eapt=1.0.10.1
55
56
57# Check with the APT name, aka essential
58testsuccessequal 'Reading package lists...
59Building dependency tree...
60The following packages will be REMOVED:
61 libapt-pkg5.0
62The following packages will be DOWNGRADED:
63 apt
640 upgraded, 0 newly installed, 1 downgraded, 1 to remove and 0 not upgraded.
65Inst apt [1.1~exp9] (1.0.10.1 unstable [all]) [libapt-pkg5.0:i386 on apt:i386] [libapt-pkg5.0:i386 ]
66Remv libapt-pkg5.0 [1.1~exp9]
67Conf apt (1.0.10.1 unstable [all])' apt install -s apt=1.0.10.1