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

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/bin/sh
  2. set -e
  3. TESTDIR=$(readlink -f $(dirname $0))
  4. . $TESTDIR/framework
  5. setupenvironment
  6. configarchitecture 'i386'
  7. setupsimplenativepackage 'compiz-core' 'i386' '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'
  13. rm -rf "$BUILDDIR"
  14. setupaptarchive
  15. testdpkgnotinstalled compiz-core
  16. msgtest 'Install package' 'compiz-core'
  17. aptget install compiz-core -qq 2>&1 >/dev/null && msgpass || msgfail
  18. testdpkginstalled compiz-core
  19. msgtest 'Remove package' 'compiz-core'
  20. aptget remove compiz-core -y -qq 2>&1 >/dev/null && msgpass || msgfail
  21. testdpkgnotinstalled compiz-core
  22. msgtest 'Check that conffiles are still around for' 'compiz-core'
  23. dpkg -l compiz-core | grep '^rc' 2>&1 >/dev/null && msgpass || msgfail
  24. testequal 'Reading package lists...
  25. Building dependency tree...
  26. Reading state information...
  27. The following packages will be REMOVED:
  28. compiz-core*
  29. 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
  30. Purg compiz-core' aptget purge compiz-core -s