[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Removal of data on purge (Was: OpenMRS package is ready, I believe)



On Tue, Oct 05, 2010 at 06:05:20PM -0700, misha680 wrote:
> I like (from a technical viewpoint perhaps :) ) your idea of asking the user
> for confirmation.
> 
> Is there any good examples/reference for using debconf for such a purpose in
> postrm?

Yes, there is.  At installation time you can ask in the configure script
whether the databases should be deleted on a purge.  You can store the
answer in a file, say for instance

     /etc/openmrs/behaviour_on_purge

(or some better name) with content:

## attention, if you set the following variable to "yes" all your data
## will be gone in case of purging the openmrs package
RemoveDataOnPurge=no


If you set this as default and make the question low priority users who
are not have set debconf to expert mode will not even see the question
and will go with the default behaviour which is leaving the data
untouched (except they tweak the config file manually afterwards at
their own risk).

In the postinst you just can evaluate the variable in this file.

This would be a simple, policy conformant (= do not ask questions in
{pre,post}rm) way.  For my feeling it is a bit overdesigned and I have
not observed something like this in other packages.  However, it will
solve the point of discussion about this issue which is rather
philosphical than technical.

Kind regards

        Andreas.

-- 
http://fam-tille.de


Reply to: