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