]>
Commit | Line | Data |
---|---|---|
08d3d7e9 MV |
1 | #!/bin/sh |
2 | set -e | |
3 | ||
4 | TESTDIR=$(readlink -f $(dirname $0)) | |
5 | . $TESTDIR/framework | |
6 | ||
7 | setupenvironment | |
8 | configarchitecture "i386" | |
9 | ||
60b3bf0c MV |
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' | |
08d3d7e9 | 14 | |
60b3bf0c MV |
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' | |
08d3d7e9 | 20 | |
60b3bf0c MV |
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' | |
08d3d7e9 | 27 | |
08d3d7e9 MV |
28 | |
29 | setupaptarchive | |
30 | ||
d029b718 | 31 | # Test if normal upgrade works as expected |
08d3d7e9 MV |
32 | testequal 'Reading package lists... |
33 | Building dependency tree... | |
2a884c61 | 34 | Calculating upgrade... |
08d3d7e9 | 35 | The following packages have been kept back: |
60b3bf0c | 36 | upgrade-with-conflict upgrade-with-new-dep |
08d3d7e9 | 37 | The following packages will be upgraded: |
60b3bf0c | 38 | upgrade-simple |
08d3d7e9 | 39 | 1 upgraded, 0 newly installed, 0 to remove and 2 not upgraded. |
60b3bf0c | 40 | Inst upgrade-simple [1.0] (2.0 unstable [all]) |
d029b718 | 41 | Conf upgrade-simple (2.0 unstable [all])' aptget -s upgrade |
08d3d7e9 | 42 | |
d029b718 | 43 | # Test if apt-get upgrade --with-new-pkgs works |
08d3d7e9 MV |
44 | testequal 'Reading package lists... |
45 | Building dependency tree... | |
2a884c61 | 46 | Calculating upgrade... |
08d3d7e9 | 47 | The following NEW packages will be installed: |
60b3bf0c | 48 | new-dep |
08d3d7e9 | 49 | The following packages have been kept back: |
60b3bf0c | 50 | upgrade-with-conflict |
08d3d7e9 | 51 | The following packages will be upgraded: |
60b3bf0c MV |
52 | upgrade-simple upgrade-with-new-dep |
53 | 2 upgraded, 1 newly installed, 0 to remove and 1 not upgraded. | |
54 | Inst new-dep (1.0 stable [all]) | |
55 | Inst upgrade-simple [1.0] (2.0 unstable [all]) | |
56 | Inst upgrade-with-new-dep [1.0] (2.0 unstable [all]) | |
57 | Conf new-dep (1.0 stable [all]) | |
58 | Conf upgrade-simple (2.0 unstable [all]) | |
d029b718 | 59 | Conf upgrade-with-new-dep (2.0 unstable [all])' aptget -s upgrade --with-new-pkgs |
08d3d7e9 | 60 | |
d029b718 | 61 | # Test if apt-get dist-upgrade works |
08d3d7e9 MV |
62 | testequal 'Reading package lists... |
63 | Building dependency tree... | |
2a884c61 | 64 | Calculating upgrade... |
60b3bf0c MV |
65 | The following packages will be REMOVED: |
66 | conflicting-dep | |
08d3d7e9 | 67 | The following NEW packages will be installed: |
60b3bf0c | 68 | new-dep |
08d3d7e9 | 69 | The following packages will be upgraded: |
60b3bf0c MV |
70 | upgrade-simple upgrade-with-conflict upgrade-with-new-dep |
71 | 3 upgraded, 1 newly installed, 1 to remove and 0 not upgraded. | |
72 | Remv conflicting-dep [1.0] | |
73 | Inst upgrade-with-conflict [1.0] (2.0 unstable [all]) | |
74 | Inst new-dep (1.0 stable [all]) | |
75 | Inst upgrade-simple [1.0] (2.0 unstable [all]) | |
76 | Inst upgrade-with-new-dep [1.0] (2.0 unstable [all]) | |
77 | Conf upgrade-with-conflict (2.0 unstable [all]) | |
78 | Conf new-dep (1.0 stable [all]) | |
79 | Conf upgrade-simple (2.0 unstable [all]) | |
d029b718 | 80 | Conf upgrade-with-new-dep (2.0 unstable [all])' aptget -s dist-upgrade |
08d3d7e9 | 81 |