[Piuparts-devel] testing packages that use dbconfig-common
Andreas Beckmann
debian at abeckmann.de
Mon Apr 23 09:15:39 UTC 2012
Hi,
what is the best way to test packages that use dbconfig-common?
There are two opposite possibilities:
1)
remove $package $deps dbconfig-common
purge $deps dbconfig-common
purge $package
==> checks that postrm script behaves sane if deps are missing
==> leaves /etc/dbconfig-common/*
2)
remove $package $deps
purge $deps
purge $package
remove dbconfig-common
purge dbconfig-common
==> cleans up /etc/dbconfig-common/*
==> has too many deps installed for postrm sanity check
Possible solution:
* for tests where we check for unowned files (sid), add dbconfig-common
to the fake-essential set => catches (fewer) leftover files in the more
useful scenario: package purged while dbconfig-common installed
* for tests were we don't care about leftover files
(--warn-on-leftovers-after-purge), do as we do now (e.g. in testing or
during upgrades) => catches postrm misbehavior
Package: dbconfig-common
Depends: ucf (>= 0.28), debconf (>= 0.5) | debconf-2.0
ucf is already transitively-essential in wheezy/sid
debconf is essential-required
==> no extra deps added, thats fine
(and I hope there are no packages that do not Depends: dbconfig-common
but use it if available)
A related question:
If a package has a debconf question about "delete possibly important
application or user data on purge" (defaulting to false) - should we use
this and preseed it to turn this feature on? For which tests? (Again
sid=on, other(--warn-on-leftovers-after-purge)=off ?)
* mysql has this and it will remove all databases and config
* mlmmj has this where it will remove the spool directory
Andreas
More information about the Piuparts-devel
mailing list