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

Re: Querying what packages are installed in postinst




Date: Tue, 27 May 2003 11:53:08 +0200
To: Bas Zoetekouw <bas@debian.org>
From: José Luis Tallón <jltallon@adv-solutions.net>
Subject: Re: Querying what packages are installed in postinst

At 11:26 27/05/2003 +0200, you wrote:
Hi Alan!

You wrote:

> For the next version of a package which I currently have sponsored in
> Debian (mozilla-mozgest) I want to add support for mozilla-firebird
> (preliminary packages are avalible from
> http://people.debian.org/~eric/debian/i386) and mozilla-snapshot. The
> problem is that in order to do this I need to do different things for
> each of the browsers in postinst and postrm. Basicaly what I'd like to
> know is if theres a nicer way to test if a package is installed than
> just testing the existance of files that the package would create if it
> was installed?

Uhm, I don't think you should do these kinds of tricks anyway.  For
example, your package wouldn't work correctly if I first install
mozilla, then mosgest, and last firebird, because your package's
postinst would only do stuff for mozilla.

Though it is quite a bit of extra work, the best approach would probably be to have several binary packages which depend on their related "browser package" and conflict with each other:

mozgest-mozilla:
        Depends: mozilla-browser
        Conflicts: mozgest-firebird, firebird
        Replaces: mozgest-firebird
        Provides: mozilla-gestures

mozgest-firebird:
        Depends: firebird
        Conflicts: mozgest-mozilla, mozilla-browser
        Replaces: mozgest-mozilla
        Provides: mozilla-gestures


( and to finish it up: )
mozilla-gestures:
        Depends: mozgest-mozilla | mozgest-firebird



or something roughly like that, IANADD [yet]  ;)



        J.L.



Reply to: