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

purge_ld_conf.pl [Was: Re: the move to stublib]



On Sat, Aug 31, 2002 at 12:25:20PM +0200, Stefano Zacchiroli wrote:
> Anyway fixing the bug does not solve the problem for who have currently
> installed packages built with buggy version of dh_ocamlld, so IIRC we
> told about adding a check for spurious path in ld.conf directly in the
> ocaml package, check that we forgot to add.

I attach a Perl script that do the dirty work: it scans the
/usr/lib/ocaml/ld.conf and if it find spurious entry (e.g. directories
that doesn't effictively contain shared objects) it tries to remove them
using ocaml-ldconf.
It skips system directories like /usr/lib/ocaml/stublibs and
/usr/local/lib/ocaml/<version>/stublibs.

Actually it isn't perfect:
1) it assume that no path was added by two packages even if ocaml-ldconf
supports it, but this case currently does not hold for debian package
library and is a bit unlikely
2) it also tries to remove directory that are in /usr/lib/ocaml/ld.conf
and that come from /etc/ocaml/ld.conf and probably fails trying to learn
the owning package from /var/lib/ocaml/ld.conf

Anyway it works!
If Sven like this solution it can be added to the ocaml postinst script
and I can provide a patch that fix the above problems (or at least the
second one that is more important and is solvable in other 5 lines of
code).

Cheers and good "Saturday Night" (fever)!!!
I'm going to have some beer ...

-- 
Stefano Zacchiroli - undergraduate student of CS @ Univ. Bologna, Italy
zack@cs.unibo.it | ICQ# 33538863 | http://www.cs.unibo.it/~zacchiro
"I know you believe you understood what you think I said, but I am not
sure you realize that what you heard is not what I meant!" -- G.Romney

Attachment: purge_ld_conf.pl
Description: Perl program

Attachment: pgp_iYyO5x7ae.pgp
Description: PGP signature


Reply to: