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
> 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.
 new dpkg maintscripts file:///var/lib/dpkg/info/dpkg.p*
 old debian-policy maintscripts