]>
Commit | Line | Data |
---|---|---|
eb76e936 DK |
1 | #!/bin/sh |
2 | set -e | |
3 | ||
4 | TESTDIR=$(readlink -f $(dirname $0)) | |
5 | . $TESTDIR/framework | |
6 | setupenvironment | |
7 | configarchitecture "i386" | |
8 | ||
9 | buildsimplenativepackage "peace-dpkg" "all" "1.0" "stable" | |
10 | ||
11 | buildsimplenativepackage "a" "all" "1.0" "stable" "Depends: b" | |
12 | buildsimplenativepackage "b" "all" "1.0" "stable" | |
13 | buildsimplenativepackage "c" "all" "1.0" "stable" "Depends: b" | |
14 | ||
15 | setupaptarchive | |
16 | ||
17 | # dpkg freaks out if the last package is removed so keep one around | |
18 | aptget install peace-dpkg -y -qq 2>&1 > /dev/null | |
19 | testdpkginstalled peace-dpkg | |
ec7f904e | 20 | testmarkedauto |
eb76e936 DK |
21 | |
22 | aptget install a -y -qq 2>&1 > /dev/null | |
23 | testdpkginstalled a b | |
24 | testdpkgnotinstalled c | |
ec7f904e | 25 | testmarkedauto 'b' |
eb76e936 DK |
26 | |
27 | aptget remove a -y -qq 2>&1 > /dev/null | |
28 | testdpkgnotinstalled a c | |
29 | testdpkginstalled b | |
ec7f904e | 30 | testmarkedauto 'b' |
eb76e936 DK |
31 | |
32 | aptget install c -y -qq 2>&1 > /dev/null | |
33 | testdpkgnotinstalled a | |
34 | testdpkginstalled b c | |
ec7f904e | 35 | testmarkedauto 'b' |
eb76e936 DK |
36 | |
37 | testequal 'Reading package lists... | |
38 | Building dependency tree... | |
39 | Reading state information... | |
40 | b is already the newest version. | |
41 | 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget install b --only-upgrade | |
ec7f904e | 42 | testmarkedauto 'b' |
eb76e936 DK |
43 | |
44 | testequal 'Reading package lists... | |
45 | Building dependency tree... | |
46 | Reading state information... | |
47 | b is already the newest version. | |
48 | 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget install b -d | |
ec7f904e | 49 | testmarkedauto 'b' |
eb76e936 DK |
50 | |
51 | aptget install b --reinstall -y -qq 2>&1 > /dev/null | |
52 | testdpkgnotinstalled a | |
53 | testdpkginstalled b c | |
ec7f904e | 54 | testmarkedauto 'b' |
eb76e936 DK |
55 | |
56 | testequal 'Reading package lists... | |
57 | Building dependency tree... | |
58 | Reading state information... | |
59 | b is already the newest version. | |
60 | b set to manually installed. | |
61 | 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget install b | |
ec7f904e | 62 | testmarkedauto |
eb76e936 DK |
63 | |
64 | aptget remove b -y -qq 2>&1 > /dev/null | |
65 | testdpkgnotinstalled a b c | |
ec7f904e | 66 | testmarkedauto |
eb76e936 DK |
67 | |
68 | aptget install a b -y -qq 2>&1 > /dev/null | |
69 | testdpkginstalled a b | |
70 | testdpkgnotinstalled c | |
ec7f904e | 71 | testmarkedauto |
eb76e936 DK |
72 | |
73 | aptget purge a b -y -qq 2>&1 > /dev/null | |
74 | testdpkgnotinstalled a b c | |
ec7f904e | 75 | testmarkedauto |
eb76e936 DK |
76 | |
77 | aptget install b c -y -qq 2>&1 > /dev/null | |
78 | testdpkgnotinstalled a | |
79 | testdpkginstalled b c | |
ec7f904e | 80 | testmarkedauto |
eb76e936 DK |
81 | |
82 | aptget install a -y -qq 2>&1 > /dev/null | |
83 | testdpkginstalled a b c | |
ec7f904e | 84 | testmarkedauto |