-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 '^rc' 2>&1 >/dev/null && msgpass || msgfail
+ if [ -z "$1" ]; then
+ testsuccessequal "Reading package lists...
+Building dependency tree...
+Reading state information...
+The following packages will be REMOVED:
+ compiz-core-${PKG}*
+0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
+Purg compiz-core-${PKG}" aptget purge compiz-core-${PKG} -s "$@"
+ else
+ # check that the rc-version isn't passed to the external resolver if its only in dpkg/status
+ export APT_EDSP_DUMP_FILENAME="${TMPWORKINGDIRECTORY}/dump-${PKG}.edsp"
+ testfailure aptget purge compiz-core-${PKG} -y "$@" -s --solver dump
+ testsuccessequal '2' grep -c "^Package: compiz-core-${PKG}\$" "$APT_EDSP_DUMP_FILENAME"
+ mv rootdir/etc/apt/sources.list.d/apt-test-stable-deb.list rootdir/etc/apt/sources.list.d/apt-test-stable-deb.disabled
+ testfailure aptget purge compiz-core-${PKG} -y "$@" -s --solver dump
+ testsuccessequal '1' grep -c "^Package: compiz-core-${PKG}\$" "$APT_EDSP_DUMP_FILENAME"
+ mv rootdir/etc/apt/sources.list.d/apt-test-stable-deb.disabled rootdir/etc/apt/sources.list.d/apt-test-stable-deb.list