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