summaryrefslogtreecommitdiff
path: root/test/integration/test-ubuntu-bug-761175-remove-purge
blob: f55c6e90967ca2dd406052c4444d95e1c27070d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sh
set -e

TESTDIR=$(readlink -f $(dirname $0))
. $TESTDIR/framework
setupenvironment
configarchitecture 'native'

setupsimplenativepackage 'compiz-core' 'native' '1.0' 'unstable'
BUILDDIR='incoming/compiz-core-1.0'
mkdir -p ${BUILDDIR}/debian/compiz-core/etc
echo 'foo=bar;' > ${BUILDDIR}/compiz.conf
echo 'compiz.conf	/etc/compiz.conf' >> ${BUILDDIR}/debian/install
buildpackage "$BUILDDIR" 'unstable' 'main' 'native'
rm -rf "$BUILDDIR"

setupaptarchive


testdpkgnotinstalled compiz-core
msgtest 'Install package' 'compiz-core'
aptget install compiz-core -qq 2>&1 >/dev/null && msgpass || msgfail
testdpkginstalled compiz-core

msgtest 'Remove package' 'compiz-core'
aptget remove compiz-core -y -qq 2>&1 >/dev/null && msgpass || msgfail
testdpkgnotinstalled compiz-core

msgtest 'Check that conffiles are still around for' 'compiz-core'
dpkg -l compiz-core | grep -q '^rc' && msgpass || msgfail

testequal 'Reading package lists...
Building dependency tree...
Reading state information...
The following packages will be REMOVED:
  compiz-core*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Purg compiz-core' aptget purge compiz-core -s