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

Re: prerm/postrm considered harmful in M-A: same packages



Hi!

On Thu, 2013-11-07 at 14:34:11 +0100, Josselin Mouette wrote:
> I noticed a problem with several packages when they were migrated to
> multiarch, and I’m afraid we have a pattern here.

This was reported on this list some time ago:

  <http://lists.debian.org/20130422053153.GA3764@gaara.hadrons.org>

> Here, libfoo is a Multi-Arch: same package.
> 
> libfoo.postinst:
>  → Generate /etc/libfoo.conf
>  → Modify /etc/bar.conf to add libfoo support (think typically NSS
> modules)
> The postinst is idempotent, so applying it once per installed
> architecture is no problem.
> 
> libfoo.prerm or postrm (in remove or purge cases):
>  → Remove /etc/libfoo.conf
>  → Remove mentions to libfoo in /etc/bar.conf
> You remove the package for one architecture, and it stops working for
> the other installed architectures.
> 
> This is of course another good reasons to use triggers everywhere we
> can, but the question is: is there a way we can detect such problems
> with lintian?

dpkg 1.17.2 will setup DPKG_MAINTSCRIPT_PACKAGE_REFCOUNT to make this
easier to handle. The aforementioned thread contains recipes on how to
do proper ref-counting with older dpkg versions.

Thanks,
Guillem


Reply to: