4 TESTDIR
=$(readlink -f $(dirname $0))
7 configarchitecture
"i386"
9 buildsimplenativepackage
"peace-dpkg" "all" "1.0" "stable"
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"
17 # dpkg freaks out if the last package is removed so keep one around
18 testsuccess aptget
install peace
-dpkg -y
19 testdpkginstalled peace
-dpkg
22 testsuccess aptget
install a
-y
24 testdpkgnotinstalled c
27 testsuccess aptget remove a
-y
28 testdpkgnotinstalled a c
32 testsuccess aptget
install c
-y
33 testdpkgnotinstalled a
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
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
51 rm rootdir
/var
/log
/apt
/history.log
53 testsuccess aptget
install b
--reinstall -y
54 testdpkgnotinstalled a
58 sed -i rootdir
/var
/log
/apt
/history.log
-e '/^Commandline: / d' -e '/^Start-Date: / d' -e '/^End-Date: / d'
59 testfileequal
'rootdir/var/log/apt/history.log' '
60 Reinstall: b:i386 (1.0)'
62 testequal
'Reading package lists...
63 Building dependency tree...
64 Reading state information...
65 b is already the newest version.
66 b set to manually installed.
67 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' aptget
install b
70 testsuccess aptget remove b
-y
71 testdpkgnotinstalled a b c
74 testsuccess aptget
install a b
-y
76 testdpkgnotinstalled c
79 testsuccess aptget purge a b
-y
80 testdpkgnotinstalled a b c
83 testsuccess aptget
install b c
-y
84 testdpkgnotinstalled a
88 testsuccess aptget
install a
-y
89 testdpkginstalled a b c