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

Re: debian/prerm is executed on *reconfigure*?



On Fri, Mar 16, 2007 at 03:52:18PM +0100, "schönfeld / in-medias-res.com" wrote:
> Hi mentors,
> hi Dpkg developers,
> 
> i could need some help with a bug that has been reported to be in one of
> my packages. According to #408823 my package removes a configuration
> file when dpkg-reconfigure is invoked. I'm really wondering about this,
> because that means that dpkg invokes my prerm script if it is called
> with dpkg-reconfigure.
> 
> Is this behaviour of dpkg correct?
This is the documented interface and intentional behavior.  dpkg prerm is
invoked before the removal of an *instance* of a package.  It can be called
with arguments including (but not limited to): "remove", "deconfigure", and
"upgrade".

> If it is. What do i need to do, so
> that my prerm script does not cause harm, when called during this stage?
You probably don't want to remove config files during the upgrade, and you
should really handle all the cases individually unless you know that they
should be the same.

Justin

References

[0] http://justinpryzby.com/debian/dpkg/
[1] new dpkg maintscripts file:///var/lib/dpkg/info/dpkg.p*
[2] old debian-policy maintscripts
[3] debian-polciy



Reply to: