]>
Commit | Line | Data |
---|---|---|
1 | #!/bin/sh | |
2 | set -e | |
3 | ||
4 | TESTDIR=$(readlink -f $(dirname $0)) | |
5 | . $TESTDIR/framework | |
6 | ||
7 | setupenvironment | |
8 | configarchitecture "i386" | |
9 | ||
10 | # simple case | |
11 | insertpackage 'stable' 'upgrade-simple' 'all' '1.0' | |
12 | insertpackage 'unstable' 'upgrade-simple' 'all' '2.0' | |
13 | insertinstalledpackage 'upgrade-simple' 'all' '1.0' | |
14 | ||
15 | # upgrade with a new dependency | |
16 | insertpackage 'stable' 'upgrade-with-new-dep' 'all' '1.0' | |
17 | insertpackage 'unstable' 'upgrade-with-new-dep' 'all' '2.0' 'Depends: new-dep' | |
18 | insertpackage 'stable' 'new-dep' 'all' '1.0' | |
19 | insertinstalledpackage 'upgrade-with-new-dep' 'all' '1.0' | |
20 | ||
21 | # upgrade with conflict and a new pkg with higher priority than conflict | |
22 | insertpackage 'stable' 'upgrade-with-conflict' 'all' '1.0' | |
23 | insertpackage 'unstable' 'upgrade-with-conflict' 'all' '2.0' 'Conflicts: conflicting-dep' 'standard' | |
24 | insertpackage 'stable' 'conflicting-dep' 'all' '1.0' | |
25 | insertinstalledpackage 'upgrade-with-conflict' 'all' '1.0' | |
26 | insertinstalledpackage 'conflicting-dep' 'all' '1.0' | |
27 | ||
28 | ||
29 | setupaptarchive | |
30 | ||
31 | # Test if normal upgrade works as expected | |
32 | testequal 'Reading package lists... | |
33 | Building dependency tree... | |
34 | The following packages have been kept back: | |
35 | upgrade-with-conflict upgrade-with-new-dep | |
36 | The following packages will be upgraded: | |
37 | upgrade-simple | |
38 | 1 upgraded, 0 newly installed, 0 to remove and 2 not upgraded. | |
39 | Inst upgrade-simple [1.0] (2.0 unstable [all]) | |
40 | Conf upgrade-simple (2.0 unstable [all])' aptget -s upgrade | |
41 | ||
42 | # Test if apt-get upgrade --with-new-pkgs works | |
43 | testequal 'Reading package lists... | |
44 | Building dependency tree... | |
45 | The following NEW packages will be installed: | |
46 | new-dep | |
47 | The following packages have been kept back: | |
48 | upgrade-with-conflict | |
49 | The following packages will be upgraded: | |
50 | upgrade-simple upgrade-with-new-dep | |
51 | 2 upgraded, 1 newly installed, 0 to remove and 1 not upgraded. | |
52 | Inst new-dep (1.0 stable [all]) | |
53 | Inst upgrade-simple [1.0] (2.0 unstable [all]) | |
54 | Inst upgrade-with-new-dep [1.0] (2.0 unstable [all]) | |
55 | Conf new-dep (1.0 stable [all]) | |
56 | Conf upgrade-simple (2.0 unstable [all]) | |
57 | Conf upgrade-with-new-dep (2.0 unstable [all])' aptget -s upgrade --with-new-pkgs | |
58 | ||
59 | # Test if apt-get dist-upgrade works | |
60 | testequal 'Reading package lists... | |
61 | Building dependency tree... | |
62 | The following packages will be REMOVED: | |
63 | conflicting-dep | |
64 | The following NEW packages will be installed: | |
65 | new-dep | |
66 | The following packages will be upgraded: | |
67 | upgrade-simple upgrade-with-conflict upgrade-with-new-dep | |
68 | 3 upgraded, 1 newly installed, 1 to remove and 0 not upgraded. | |
69 | Remv conflicting-dep [1.0] | |
70 | Inst upgrade-with-conflict [1.0] (2.0 unstable [all]) | |
71 | Inst new-dep (1.0 stable [all]) | |
72 | Inst upgrade-simple [1.0] (2.0 unstable [all]) | |
73 | Inst upgrade-with-new-dep [1.0] (2.0 unstable [all]) | |
74 | Conf upgrade-with-conflict (2.0 unstable [all]) | |
75 | Conf new-dep (1.0 stable [all]) | |
76 | Conf upgrade-simple (2.0 unstable [all]) | |
77 | Conf upgrade-with-new-dep (2.0 unstable [all])' aptget -s dist-upgrade | |
78 |