On Thu, Sep 05, 2002 at 06:22:10PM +0200, Denis Barbier wrote: > On Thu, Sep 05, 2002 at 05:44:36PM +0200, Sven LUTHER wrote: > [...] > > Right now, ocaml-ldconf does (or should do) as follows : > [...] > > o A new option might be added (-R ?) so that it removes all dirs > > associated with the given package. > > Or for each entry listed in /var/lib/dpkg/ld.conf, make sure there are some > stuff there, otherwise delete it (IIRC this is what Stefano suggested).
Yes, but i am still not convinced by it. Maybe there is a legitimate reason for packages to provide empty stublibs dir ? Maybe some library which does not provide stublibs by itself, but can be used to generate some. For example, ocaml-base provides /usr/local/lib/ocaml/3.06/stublibs, but this directory is empty, and anyway i hardcoded it in ocaml-ldconf.ml. Anyway, having the libraries do the job for each of them sounds neater to me than having ocaml-base do the cleanup for the mess broken libraries may leave behind them. > > Then, we use : > > > > o in ocaml-base : dh_ocamlld -i -pocaml-base > > > > o in broken libraries : dh_ocamlld -rver.num-deb -pbroken-lib > > > > o in legacy libraries : dh_ocamlld -a -plegacy-lib dir_list > > > > Where ver.num-deb is the first version of this package which fixes the > > problem. We then have some code in the postinst, which will check the > > fixed ver.num-deb against the version to be removed, and call > > ocaml-ldconf -R -pbroken-lib to remove all spurious entries. > > Or let ocaml-base run `ocaml-ldconf -R' and that's all, no need to worry > about package versions. Yes, this is an acceptable workaround, the idea of keeping track of the version number was a sort of optimisation, so that if we know that the currently installed library package is not broken, then we don't need to cleanup /var/lib/ocaml/ld.conf. Especially as most libraries will not need to touch any ld.conf file anyway, since they should put stublibs in the default place (/usr/lib/ocaml/stublibs). Friendly, Sven Luther

