[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 Wed, Oct 06, 2010 at 01:41:23PM -0500, Misha Koshelev wrote:
> Sorry I've read all your emails but I'm a little slow on the uptake.

No problem - nobody will ask you for speeding up.

> ... 
> http://da2i.univ-lille1.fr/cgi-bin/man/man2html?debconf-devel+7
> http://manpages.ubuntu.com/manpages/hardy/man7/debconf-devel.7.html
> "Note  that  if your package???s sole use of debconf is in the postrm, you
>  should      make       your       package???s       postinst       source
>  /usr/share/debconf/confmodule, to give debconf a chance to load up your
>  templates file into its database. Then the templates will be  available
>  when your package is being purged."
> This implies it's okay to have sole use of debconf be in postrm.
> 
> http://www.mail-archive.com/debian-mentors@lists.debian.org/msg37547.html
> "If you use debconf, you should really ask that question when the package
> is removed, not when its conffiles are purged, though you may only want
> to delete the database files on purge. The rationale for this is that
> there is no mechanism in place to guarantee that a certain other
> package, in this instance debconf, is installed at purge time (though
> the assumption may be fairly safe). The least bad solution I can see is
> to ask at remove time, store the result outside of debconf
> (/etc/default) and kill the db on purge if requested."
> This also implies its okay to ask at remove time, whether on remove or purge.

In principle I would agree that finally it makes more sense to ask the
question if you are about to remove something and not an undetermined
time in advance (install time).

> But the Debian Policy Manual seems definitive it is _not_ okay so I'll
> go with that:
> http://www.debian.org/doc/debian-policy/ch-binary.html#s-maintscriptprompt
> "Any necessary prompting should almost always be confined to the
> config or postinst script."
> (and postrm is not mentioned)

In my mail recommended the policy conform solution.  However, I think
policy should not be a law if it makes sense to follow other
precedences.  So if you prefer to ask in *rm script rather than at
config time I would not veto this.  There is no point in blindly
following some rules if an exception makes sense.

Kind regards and thanks for your intensive research

    Andreas.

-- 
http://fam-tille.de


Reply to: