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

Re: dh_ocaml



Hello,

On Mon, Aug 01, 2005 at 04:17:55PM +0200, Stefano Zacchiroli wrote:
> Now that the version of the ocaml package with ocaml-md5sums has been
> uploaded is time to speak about dh_ocaml: a new debhelper able to
> automatically compute ocaml dependencies.
> 
> Architecture:
> 
>   The architecture is centered on the "md5sums registry", located in
>   /var/lib/ocaml/md5sums/MD5SUMS, its format is described below.
> 
>   The overall idea is that each package shipping an ocaml library adds
>   entries to the registry. Each entry roughly state "I provide unit Foo
>   with md5sum ....".
> 
>   When another package is built dh_ocaml looks for all ocaml bytecode
>   objects it ships and using ocaml-md5sums collects information about
>   referenced units and corresponding md5sums. Then, looking up in
>   md5sums registry, dh_ocaml is able to collect a list of dependencies
>   for the package being built and fills the substvar ${ocaml:Depends}
>   with that list.
> 
>   In order to keep the registry up to date each package ships a .md5sums
>   entry which get installed in /var/lib/ocaml/md5sums/. ocaml-md5sums is
>   then used in postinst/prerm scripts to merge all .md5sums entries in
>   the md5sums registry. dh_ocaml is also in charge of automatically
>   creating .md5sums entries, install it in the proper place at package
>   build time and of creating postinst/prerm scripts.
> 
>   dh_ocaml takes care also of adding "standard" dependencies like that
>   on ocaml-base..., and findlib.
> 

Does it also warn you about the fact that some library are out of of
date (ie you cannot find MD5 of one dependency). For example, the is a
package A.deb provding the module A and B.deb providing the module B
which depend on A. Now, A.deb is rebuild and the signature of A is
changed... When installing A.deb, does a warning concerning the fact
that the module B (which is installed) doesn't be able to compile
because the signature of A has changed. ?

> Md5sums registry format:
> 
>   Its structure is a list of records, one per row. Each record has 5
>   fields, field separator is a space. The first two fields are keys in
>   the registry: an md5sums and a unit name as those reported by
>   ocamlobjinfo. The remaining three fields denotes the dependencies
>   which a packages using a given unit name with a given md5sums should
>   have. Field 3 is the name of a development time ("-dev") dependency
>   while field 4 is the name of the corresponding runtime dependency (if
>   any, the string "-" if no runtime dependency exists). The last field
>   is the version information for the dependencies (if needed, the string
>   "-" if not needed).
> 
> Please test it ...
> 

I will have some days when coming back from my holiday next friday, i
will be able to test this (and svn-buildpackage). 

Kind regard
Sylvain Le Gall



Reply to: