Re: Running dpkg -r foo from a postinst script?
On Wed, Sep 19, 2001 at 06:11:53PM +0200, Ola Lundqvist wrote:
> I have a simple question. Is it possible to run dpkg -r foo
> from within a postinst-script when using dselect or apt?
> What is the result?
You can't do it directly, as dpkg has locked the status file at that
point. The sgmltools-lite (?) maintainer tried hacking around that by
waiting for the lock to be released once, and it immediately got a
justifiable grave bug; the race conditions are ugly. Don't do it.
> It whould be very helpful when creating the improved harden
> packages. :)
I think you should consider more carefully what you're trying to
Colin Watson [firstname.lastname@example.org]