]>
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 | 10 | # simple case |
10e100e5 | 11 | insertpackage 'stable,installed' 'upgrade-simple' 'all' '1.0' |
60b3bf0c | 12 | insertpackage 'unstable' 'upgrade-simple' 'all' '2.0' |
08d3d7e9 | 13 | |
60b3bf0c | 14 | # upgrade with a new dependency |
10e100e5 | 15 | insertpackage 'stable,installed' 'upgrade-with-new-dep' 'all' '1.0' |
60b3bf0c MV |
16 | insertpackage 'unstable' 'upgrade-with-new-dep' 'all' '2.0' 'Depends: new-dep' |
17 | insertpackage 'stable' 'new-dep' 'all' '1.0' | |
08d3d7e9 | 18 | |
60b3bf0c | 19 | # upgrade with conflict and a new pkg with higher priority than conflict |
10e100e5 | 20 | insertpackage 'stable,installed' 'upgrade-with-conflict' 'all' '1.0' |
60b3bf0c | 21 | insertpackage 'unstable' 'upgrade-with-conflict' 'all' '2.0' 'Conflicts: conflicting-dep' 'standard' |
10e100e5 | 22 | insertpackage 'stable,installed' 'conflicting-dep' 'all' '1.0' |
08d3d7e9 MV |
23 | |
24 | setupaptarchive | |
25 | ||
d029b718 | 26 | # Test if normal upgrade works as expected |
08d3d7e9 MV |
27 | testequal 'Reading package lists... |
28 | Building dependency tree... | |
2a884c61 | 29 | Calculating upgrade... |
08d3d7e9 | 30 | The following packages have been kept back: |
60b3bf0c | 31 | upgrade-with-conflict upgrade-with-new-dep |
08d3d7e9 | 32 | The following packages will be upgraded: |
60b3bf0c | 33 | upgrade-simple |
08d3d7e9 | 34 | 1 upgraded, 0 newly installed, 0 to remove and 2 not upgraded. |
60b3bf0c | 35 | Inst upgrade-simple [1.0] (2.0 unstable [all]) |
d029b718 | 36 | Conf upgrade-simple (2.0 unstable [all])' aptget -s upgrade |
08d3d7e9 | 37 | |
d029b718 | 38 | # Test if apt-get upgrade --with-new-pkgs works |
08d3d7e9 MV |
39 | testequal 'Reading package lists... |
40 | Building dependency tree... | |
2a884c61 | 41 | Calculating upgrade... |
08d3d7e9 | 42 | The following NEW packages will be installed: |
60b3bf0c | 43 | new-dep |
08d3d7e9 | 44 | The following packages have been kept back: |
60b3bf0c | 45 | upgrade-with-conflict |
08d3d7e9 | 46 | The following packages will be upgraded: |
60b3bf0c MV |
47 | upgrade-simple upgrade-with-new-dep |
48 | 2 upgraded, 1 newly installed, 0 to remove and 1 not upgraded. | |
49 | Inst new-dep (1.0 stable [all]) | |
50 | Inst upgrade-simple [1.0] (2.0 unstable [all]) | |
51 | Inst upgrade-with-new-dep [1.0] (2.0 unstable [all]) | |
52 | Conf new-dep (1.0 stable [all]) | |
53 | Conf upgrade-simple (2.0 unstable [all]) | |
d029b718 | 54 | Conf upgrade-with-new-dep (2.0 unstable [all])' aptget -s upgrade --with-new-pkgs |
08d3d7e9 | 55 | |
d029b718 | 56 | # Test if apt-get dist-upgrade works |
08d3d7e9 MV |
57 | testequal 'Reading package lists... |
58 | Building dependency tree... | |
2a884c61 | 59 | Calculating upgrade... |
60b3bf0c MV |
60 | The following packages will be REMOVED: |
61 | conflicting-dep | |
08d3d7e9 | 62 | The following NEW packages will be installed: |
60b3bf0c | 63 | new-dep |
08d3d7e9 | 64 | The following packages will be upgraded: |
60b3bf0c MV |
65 | upgrade-simple upgrade-with-conflict upgrade-with-new-dep |
66 | 3 upgraded, 1 newly installed, 1 to remove and 0 not upgraded. | |
67 | Remv conflicting-dep [1.0] | |
68 | Inst upgrade-with-conflict [1.0] (2.0 unstable [all]) | |
69 | Inst new-dep (1.0 stable [all]) | |
70 | Inst upgrade-simple [1.0] (2.0 unstable [all]) | |
71 | Inst upgrade-with-new-dep [1.0] (2.0 unstable [all]) | |
72 | Conf upgrade-with-conflict (2.0 unstable [all]) | |
73 | Conf new-dep (1.0 stable [all]) | |
74 | Conf upgrade-simple (2.0 unstable [all]) | |
d029b718 | 75 | Conf upgrade-with-new-dep (2.0 unstable [all])' aptget -s dist-upgrade |
08d3d7e9 | 76 |