test-ubuntu-bug-761175-remove-purge 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/bin/sh
  2. set -e
  3. TESTDIR=$(readlink -f $(dirname $0))
  4. . $TESTDIR/framework
  5. setupenvironment
  6. configarchitecture 'native'
  7. setupsimplenativepackage 'compiz-core' 'native' '1.0' 'unstable'
  8. BUILDDIR='incoming/compiz-core-1.0'
  9. mkdir -p ${BUILDDIR}/debian/compiz-core/etc
  10. echo 'foo=bar;' > ${BUILDDIR}/compiz.conf
  11. echo 'compiz.conf /etc/compiz.conf' >> ${BUILDDIR}/debian/install
  12. buildpackage "$BUILDDIR" 'unstable' 'main' 'native'
  13. rm -rf "$BUILDDIR"
  14. setupaptarchive
  15. testdpkgnotinstalled compiz-core
  16. testsuccess aptget install compiz-core
  17. testdpkginstalled compiz-core
  18. testsuccess aptget remove compiz-core -y
  19. testdpkgnotinstalled compiz-core
  20. msgtest 'Check that conffiles are still around for' 'compiz-core'
  21. dpkg -l compiz-core | grep -q '^rc' && msgpass || msgfail
  22. testequal 'Reading package lists...
  23. Building dependency tree...
  24. Reading state information...
  25. The following packages will be REMOVED:
  26. compiz-core*
  27. 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
  28. Purg compiz-core' aptget purge compiz-core -s