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

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



On Mon, Sep 09, 2002 at 02:02:35PM +0200, Denis Barbier wrote:
> On Mon, Sep 09, 2002 at 10:13:10AM +0200, Sven LUTHER wrote:
> [...]
> > > IMO we should discuss 2 after 1, and not before.
> > 
> > 1 is clear, we all agree on it
> 
> No it's not clear, at least for me.  See e.g. your questions about

Ok, let's clarify things.

After a long discution with upstream, it was decided that the new only
true way of handling stublibs would be to put all stublibs in one
directory (/usr/lib/ocaml/stublibs), which more or less obsoletes any
work we did do on the dh_ocamlld/ocaml-ldconf issue, but then, they
could not be convinced to have this discussion back then.

Sure this mean we (mostly you and me) did many work for nothing back
then, but then it was me who forced the issue on having a standard way
for all of ocaml, after me and an rpm packager proposed different
solutions on the caml upstream list, and upstream told us none of the
solutions seemed good to him. Anyway, i think that a standard is a good
thing to have, and we should adapt to it.

So, the long term goal is to have all packages install the stublibs into
the standard place (and have all hand installed stuff put them into
/usr/local/lib/ocaml/<version_number>/stublibs), so there is no more
complex ld.conf handling necessary.

Ocaml-ldconf will include these two dirs as hardcoded in ocaml-ldconf
generating /usr/lib/ocaml/ld.conf (from the /etc and the /var ones, as
before).

We need to keep the current scheme going though, because it can server
other purposes, and to keep backward compatibility with older libs, to
give a breathing time for library maintainer before they have to change
their packages acordyingly. (as an example, i did change mlgtk so it now
complies to the new scheme, but i have keept camlzip still complying to
the old scheme).

Does this clarify things for you, or should i give more precisions ? In
the later case, please tell me what exactly is that needs clarification,
so i can respond to those questions.

> the removal of /var/lib/ocaml/ld.conf.  You also did not tell
> whether postrm or prerm scripts must be used to remove entries from
> /var/lib/ocaml/ld.conf when needed.  The former is currently in use
> whereas ocaml_packaging_policy states the latter.

Mmm, i guess the ocaml_packaging_policy was an error on my part, i meant
postrm (as this is what was done originally by the dh_ocamlld script).
Sorry for the unclearness.

> The whole lifecycle of this file must be carefully designed, and when
> it is we can see how to implement it, which will then be trivial.

Well, i thought it was well designed from the start, when we created the
ocaml-ldconf thingy and dh_ocamlld scripts.

The only real problem is that the new scheme does not really need this
complexity anymore, so we will slowly phase it out, but keep it around
in a working phase for exceptional uses and for easing the transition
phase on library maintainers.

Now, as the result of the new scheme, two problems appeared we did not
see :

  o ocaml-base does not provide any directory anymore (well, it provides
  two of them, but i have hardcoded them into ocaml-ldconf). As a result
  when dh_ocamlld is called without dirlist, ocaml-ldconf is no more
  called in the postinst, and the bad /usr/lib/ocaml/ld.conf file is not
  overwritten.

  => I have solved this by overwriting the /usr/lib/ocaml/ld.conf file
  in the postinst. Sure i did not think about its removal (but the
  original file is still part of the ocaml-base package, so it will get
  removed all the same). Previously both other files were conffiles, but
  after discution with Stefano, it seems more reasonable not to have
  /var/lib/ocaml/ld.conf be a conffile, and have it created/removed by
  postinst/postrm as it is now.

  The fact that it is a postrm or a prerm does not, in my understanding
  of it, play that much of a role, but i think it is better done in
  postrm, since so we are sure that the ocaml-base removal went well
  when removing the file.

  o The second problem was that files did not do the postrm part
  (ocaml-ldconf -r call) when upgrading, so the disappeareance of the
  dirlist did have as result that the corresponding entries did not
  get removed from the file.

  => This is only a cosmetic problem, but it would be nice to solve it.
  Stefano wanted a centralized cleanup script (which could be done by
  scanning directories as he proposed, but maybe also by removing any
  entries, and scanning the /var/lib/dpkg/info/xxx.postinst scripts for
  ocaml-ldconf -a calls and add them again) and i thought it was better
  to handle this in the packages.

> As you said, removing superfluous entries from /var/lib/ocaml/ld.conf
> is only cosmetics, so I do not understand why you focus on this task
> instead of finding the best implementation of ocaml-ldconf usage.

<joke>
Well, stefano threatened to NMU me on this if it was not solved :))
</joke>

No seriously, i thought that the best implementation of ocaml-ldconf
usage was clear, and that we just needed to fix this one problem, as the
previous one (bad original ld.conf in ocaml-base) was already fixed.

I propose a solution to do this cleanly, well, as cleanly as possible,
having the benefit of both stefano's and my's proposal, without being to
heavy (and thus error-prone) to implement.

Notice that i also proposed the third issue, that is just let things
like they are, and have the user cleanup things by himself.

Friendly,

Sven Luther




Reply to: