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

Re: Deb scripts idempotency [Was: Re: new packages uploaded ...]



On Mon, Dec 24, 2001 at 10:56:26AM +0100, Stefano Zacchiroli wrote:
> On Fri, Dec 21, 2001 at 02:54:19PM +0100, Sven wrote:
> > postinst :
> > 
> >     echo "/usr/lib/ocaml/lablgl" >>/usr/lib/ocaml/ld.conf
> 
> deb scripts must be idempotent, postinst as above is not. You can add a
> test that check if /usr/lib/ocaml/lablgl already esists in ld.conf, in
> such a case the new entry is not added.

You are fully right.

> BTW as already proposed, we can write a simple perl script that add and
> remove entry from ld.conf, but where we can put them?

See ldconfig, it does roughly the same job (I don't say more because I
do not know much about it).

> Have we to ask the debhelper guys to include it in new debhelper or we
> want to add it to the ocaml package?

This script has nothing to do with debhelper.  OTOH one could add a dh script
similar to dh_makeshlibs, which would automatically call the former in
post{inst,rm} maintainer scripts.  In this case, I believe that you can
add it in ocaml.  Joey Hess sent guidelines on debian-devel weeks ago for such
dh scripts.

Denis



Reply to: