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

Re: New dependency system.



On Tue, Oct 13, 2009 at 03:23:58PM +0200, Stéphane Glondu wrote:
> Stefano Zacchiroli a écrit :
> > [...]  In practice however, dh_ocaml computes a single
> > ABI checksum for all binary packages of a given source package and use
> > that checksum for the Provides of all binary packages. So, even packages
> > containing only C stubs have their checksum.
> No. dh_ocaml computes a checksum per libxxx/libxxx-dev pair (or per
> libxxx-dev if there is no libxxx counterpart), by looking at the ABI of
> whatever is shipped by both of them. Have a look at lablgtk2, for example.

Fair enough, I generalized too much my understanding of the common case
of just 2 packages (one dev and one runtime).

Still, I believe this detail doesn't change anything about my arguments
and my conclusion, namely: it is not possible to have a (binary) package
on which you don't have material on which compute a checksum. Hence why
should we keep the = ${binary:Version} relationships?

> If we assume that users of a library which uses C part interacts with it
> only via the ML interface (i.e. not declaring external that they don't
> own), then we can reduce the ABI of a C stub library to the ABI of the
> ML interfaces that give access to it. That's what is done in dh_ocaml.
<snip>
> > [1] Actually, this is rather interesting. I'm surprised that upstream
> >     has never thought about this: it would be terribly useful to store
> >     in some part of the .so a checksum which is verified at runtime
> >     before loading the .so. I guess there is a technical reason for not
> >     having done that, but I can't find exactly which at the moment.
> For the same reason as above, adding such checksums would be pointless
> (IMHO).

Uh?

The point is exactly to detect incompatibility among the two at load
level, before a segfault hits you. With the current solution we can
enforce compatibility between interfaces and .so at the dependency
level, but the OCaml runtime can't check anything.

Also, the above mechanism of computing ABI checksum for the -dev part
and assigning it to the runtime part looks like a hack to me because we
can't infer anything from the .so. Hack that we could remove if .so were
inspectable. ... but that's sci-fi for now :-)

Cheers.

-- 
Stefano Zacchiroli -o- PhD in Computer Science \ PostDoc @ Univ. Paris 7
zack@{upsilon.cc,pps.jussieu.fr,debian.org} -<>- http://upsilon.cc/zack/
Dietro un grande uomo c'è ..|  .  |. Et ne m'en veux pas si je te tutoie
sempre uno zaino ...........| ..: |.... Je dis tu à tous ceux que j'aime

Attachment: signature.asc
Description: Digital signature


Reply to: