]> git.saurik.com Git - apt.git/blame - test/integration/test-ubuntu-bug-761175-remove-purge
test-apt-download-progress: Allow smaller progress change
[apt.git] / test / integration / test-ubuntu-bug-761175-remove-purge
CommitLineData
949e033c
DK
1#!/bin/sh
2set -e
3
4TESTDIR=$(readlink -f $(dirname $0))
5. $TESTDIR/framework
6setupenvironment
016bea82
DK
7configarchitecture 'amd64' 'i386'
8
9buildcompizpkg() {
10 setupsimplenativepackage "compiz-core-$1" "$2" "$3" "$4"
11 BUILDDIR="incoming/compiz-core-$1-$3"
12 mkdir -p ${BUILDDIR}/debian/compiz-core/etc
13 echo 'foo=bar;' > ${BUILDDIR}/compiz.conf
14 echo 'compiz.conf /etc/compiz.conf' >> ${BUILDDIR}/debian/install
15 buildpackage "$BUILDDIR" "$4" 'main' "$2"
16 rm -rf "$BUILDDIR"
17}
18buildcompizpkg 'native' 'all' '1.0' 'stable'
19buildcompizpkg 'all' 'native' '1.0' 'stable'
20buildcompizpkg 'native' 'native' '2.0' 'unstable'
21buildcompizpkg 'all' 'all' '2.0' 'unstable'
949e033c
DK
22
23setupaptarchive
24
016bea82
DK
25runtests() {
26 testdpkgnotinstalled compiz-core-$1
27 testsuccess aptget install compiz-core-$1 -t "${2:-unstable}"
28 testdpkginstalled compiz-core-$1
949e033c 29
016bea82
DK
30 testsuccess aptget remove compiz-core-$1 -y
31 testdpkgnotinstalled compiz-core-$1
32 testdpkgstatus 'rc' '1' "compiz-core-$1"
949e033c 33
25b86db1 34 testsuccessequal "Reading package lists...
949e033c
DK
35Building dependency tree...
36Reading state information...
37The following packages will be REMOVED:
016bea82 38 compiz-core-$1*
949e033c 390 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
016bea82
DK
40Purg compiz-core-$1" aptget purge compiz-core-$1 -s
41 testsuccess aptget purge compiz-core-$1 -y
41fadd29
DK
42 echo -n '' > rootdir/var/lib/dpkg/available # dpkg -l < 1.16.2 reads the available file by default, where the package can be found
43 testequalor2 "dpkg-query: no packages found matching compiz-core-$1" "No packages found matching compiz-core-$1." dpkg -l compiz-core-$1
016bea82
DK
44}
45
46msgmsg 'Test in multi arch environment'
47runtests 'native'
48runtests 'all'
49runtests 'native' 'stable'
50runtests 'all' 'stable'
51
52msgmsg 'Test in single arch environment'
53configarchitecture 'amd64'
54runtests 'native'
55runtests 'all'
56runtests 'native' 'stable'
57runtests 'all' 'stable'