]>
Commit | Line | Data |
---|---|---|
c919ad6e DK |
1 | #!/bin/sh |
2 | set -e | |
3 | ||
3abb6a6a DK |
4 | TESTDIR="$(readlink -f "$(dirname "$0")")" |
5 | . "$TESTDIR/framework" | |
c919ad6e DK |
6 | setupenvironment |
7 | configarchitecture 'amd64' | |
8 | ||
9 | insertinstalledpackage 'pkgb' 'none' '1' | |
10 | insertinstalledpackage 'pkgd' 'none' '1' | |
11 | insertpackage 'unstable' 'pkga' 'amd64' '2' 'Depends: pkgb' | |
12 | insertpackage 'unstable' 'pkgb' 'amd64' '2' | |
13 | insertpackage 'unstable' 'pkgc' 'amd64' '1' 'Conflicts: pkgb' | |
c919ad6e DK |
14 | |
15 | setupaptarchive | |
16 | ||
25b86db1 | 17 | testsuccessequal 'Reading package lists... |
c919ad6e DK |
18 | Building dependency tree... |
19 | The following packages will be REMOVED: | |
20 | pkgb:none | |
21 | The following NEW packages will be installed: | |
22 | pkgc | |
23 | 0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded. | |
24 | Remv pkgb:none [1] | |
25 | Inst pkgc (1 unstable [amd64]) | |
26 | Conf pkgc (1 unstable [amd64])' aptget install pkgc -s | |
27 | ||
25b86db1 | 28 | testsuccessequal 'Reading package lists... |
c919ad6e | 29 | Building dependency tree... |
e7ebb414 | 30 | The following additional packages will be installed: |
c919ad6e DK |
31 | pkgb |
32 | The following packages will be REMOVED: | |
33 | pkgb:none | |
34 | The following NEW packages will be installed: | |
35 | pkga pkgb | |
36 | 0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded. | |
37 | Remv pkgb:none [1] | |
38 | Inst pkgb (2 unstable [amd64]) | |
39 | Inst pkga (2 unstable [amd64]) | |
40 | Conf pkgb (2 unstable [amd64]) | |
41 | Conf pkga (2 unstable [amd64])' aptget install pkga -s | |
42 | ||
c919ad6e DK |
43 | # do not automatically change from none-arch to whatever-arch as |
44 | # this breaks other none packages and dpkg has this ruleset as | |
45 | # this difference seems so important that it has to be maintained … | |
25b86db1 | 46 | testsuccessequal 'Reading package lists... |
c919ad6e | 47 | Building dependency tree... |
2a884c61 | 48 | Calculating upgrade... |
c919ad6e DK |
49 | 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget dist-upgrade -s |
50 | ||
51 | # pkgd has no update with an architecture | |
52 | testdpkginstalled pkgd | |
53 | msgtest 'Test apt-get purge' 'pkgd' | |
0440d936 | 54 | testsuccess --nomsg aptget purge pkgd -y |
c919ad6e DK |
55 | testdpkgnotinstalled pkgd |
56 | ||
57 | # there is a pkgb with an architecture | |
58 | testdpkginstalled pkgb | |
59 | msgtest 'Test apt-get purge' 'pkgb:none' | |
0440d936 | 60 | testsuccess --nomsg aptget purge pkgb:none -y |
c919ad6e DK |
61 | testdpkgnotinstalled pkgb |
62 | ||
63 | # check that dependencies are created after the none package exists in the cache | |
64 | rm rootdir/var/cache/apt/*.bin | |
65 | insertinstalledpackage 'pkgb' 'none' '1' | |
66 | insertinstalledpackage 'pkgf' 'none' '1' 'Conflicts: pkgb' | |
67 | insertinstalledpackage 'pkgg' 'amd64' '1' 'Conflicts: pkgb' | |
68 | insertinstalledpackage 'pkgb' 'amd64' '2' | |
18908589 | 69 | testequalor2 "Reading package lists... |
c919ad6e DK |
70 | Building dependency tree... |
71 | Reading state information... | |
72 | You might want to run 'apt-get -f install' to correct these. | |
73 | The following packages have unmet dependencies: | |
74 | pkgb : Conflicts: pkgb:none but 1 is installed | |
75 | pkgb:none : Conflicts: pkgb but 2 is installed | |
76 | pkgf:none : Conflicts: pkgb:none but 1 is installed | |
77 | Conflicts: pkgb but 2 is installed | |
78 | pkgg : Conflicts: pkgb but 2 is installed | |
79 | Conflicts: pkgb:none but 1 is installed | |
18908589 DK |
80 | E: Unmet dependencies. Try using -f." "Reading package lists... |
81 | Building dependency tree... | |
82 | Reading state information... | |
83 | You might want to run 'apt-get -f install' to correct these. | |
84 | The following packages have unmet dependencies: | |
85 | pkgb : Conflicts: pkgb:none but 1 is installed | |
86 | pkgb:none : Conflicts: pkgb but 2 is installed | |
87 | pkgf:none : Conflicts: pkgb but 2 is installed | |
88 | Conflicts: pkgb:none but 1 is installed | |
89 | pkgg : Conflicts: pkgb but 2 is installed | |
90 | Conflicts: pkgb:none but 1 is installed | |
c919ad6e | 91 | E: Unmet dependencies. Try using -f." aptget check |
7605509f DK |
92 | |
93 | # check that dependencies are generated for none-packages | |
94 | rm rootdir/var/lib/dpkg/status | |
95 | insertinstalledpackage 'pkgx' 'none' '1' | |
96 | insertinstalledpackage 'pkgy' 'none' '1' 'Depends: pkgz, pkgx (>= 1)' | |
97 | insertinstalledpackage 'pkgz' 'none' '1' | |
25b86db1 | 98 | testsuccessequal 'Reading package lists... |
7605509f DK |
99 | Building dependency tree... |
100 | Reading state information... | |
101 | The following packages will be REMOVED: | |
102 | pkgx:none* pkgy:none* | |
103 | 0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded. | |
104 | Purg pkgy:none [1] | |
105 | Purg pkgx:none [1]' aptget purge pkgx -s | |
25b86db1 | 106 | testsuccessequal 'Reading package lists... |
7605509f DK |
107 | Building dependency tree... |
108 | Reading state information... | |
109 | The following packages will be REMOVED: | |
110 | pkgy:none* pkgz:none* | |
111 | 0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded. | |
112 | Purg pkgy:none [1] | |
113 | Purg pkgz:none [1]' aptget purge pkgz -s |