Sorry for the long delay ... Yes, i like this solution, i will implement it nextly, but i will upload the -5 package without it in the meantime, since it contains many stuff needed by other people, and also i would very much like to know how the different architectures handle the ocaml-native-compilers/ocaml-nbest-compilers stuff.
Saddly, the ld.conf file doesn't allow any kind of comment in the front of the package, but i will try to hack the corresponding bit of the ocaml source in order to allow it. On Tue, Jan 15, 2002 at 11:13:59PM +0100, Denis Barbier wrote: > On Mon, Jan 14, 2002 at 03:06:15PM +0100, Sven wrote: > [...] > > Mmm, Xavier told me that ld.conf was built using /etc/ld.conf as example, so > > it is more a configuration file. > > > > Also it makes sense to let users modify them by hand, imagine people adding a > > homebuilt library or something such, without any knowledge of how debian > > works. > > > > That said, we could imagine handling 2 such databases ? > > This indeed looks like a good idea. Here is a suggestion: > * /etc/ocaml/paths: configuration file which is manually edited > by sysadmins > * /var/lib/ocaml/dpkg-paths: file automatically modified by dpkg > (its name is dpkg-paths in this mail to distinguish it from the > previous one, but it could be /var/lib/ocaml/paths). > * /usr/lib/ocaml/ld.conf: this file is generated by merging the 2 previous > ones. > > File syntax: > i. paths: > <directory> <action> > where > * directory is ..... guess what? > * action: > add add a directory to search path before system wide settings > addafter add a directory to search path after system wide settings > discard remove a directory from search path even if it is defined > in dpkg-paths > ii. dpkg-paths: > <directory> add <package> > where <package> is the name of the package which inserted this entry. > > Thus both files can be described by a similar syntax: > <directory> <action> <package> > the 3rd field being optional. > Allowing comments (with an hash sign for instance) would be nice. > > The ocaml-ldconf is used to insert and remove entries from dpkg-paths, > and generate ld.conf. > It could accept the following options: > -p package sets package name > -a dir adds a line `dir add package' into dpkg-paths if such > a line does not exist > -r dir remove lines `dir add package' from dpkg-paths if found > -n do not update ld.conf > > When invoked without -n flag, ocaml-ldconf regenerates ld.conf this way: > * it reads paths line by line, and builds > a) D1: list of directories to insert before system dirs > b) D2: list of directories to insert after system dirs > c) I: list of directories to ignore > * after that, it reads dpkg-paths line by line, and builds a directory > list D3 by skipping those found in I. > Then D1+D3+D2 is written into /usr/lib/ocaml/ld.conf > It would also be nice if a warning line could be added to ld.conf to > prevent users from manually editing this file. > > Last, ocaml-ldconf could be called directly by sysadmin to update ld.conf > after editing paths, or by maintainer scripts with arguments: > * in postinst: > ocaml-ldconf -p package -a dir1 -a dir2 -a dir3 > * in postrm: > ocaml-ldconf -p package -r dir1 -r dir2 -r dir3 > > Denis > > > -- > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

