Re: versioned libraries dependencies
On Wed, Nov 20, 2002 at 10:26:16AM +0100, Stefano Zacchiroli wrote:
> On Wed, Nov 20, 2002 at 10:10:55AM +0100, Sven Luther wrote:
> > Not always, the .cmi can also be generated from .ml, in case there is no
> > corresponding .mli, which happens from time to time.
>
> Ok, right.
>
> > > Writing a tool that scans the /usr/lib/ocaml library for incosistencies
> > > is quite easy using objinfo which shows md5sums of all imported
> > > interfaces.
> >
> > Well, you have to check that the installed version and the currently
> > built version. Provided the installed version is the last one.
>
> Yes, I was assuming that a maintainer will install the just built
> library and then perform the test.
>
> > Err, i was more thinking about a tool which would tell the maintainer if
> > he needs to bump the virtual provide or not.
>
> This is more complicated though.
Not necessary though.
The idea is to build your package with the latest version installed,
then have in the debian/rules a call to this tool, which would :
o check the md5sum of the going to be installed packages.
o chech the md5sum of the installed package.
o if there is a difference, output a warning, or even stop the build.
The maintainer can then bump the version, and comment this line, and
redo the build.
i guess a simple shell script should do, of the kind :
for i in `list of .cmi`; do
if [`objinfo -md5sum debian/foo/$i` -neq `objinfo -md5sum $i`]
echo "warning"
exit 18
fi
done
or something such.
Friendly,
Sven Luther
Reply to: