On Thu, 1 Oct 2009, Richard W.M. Jones wrote:
On Mon, Sep 28, 2009 at 04:33:24PM -0600, Orion Poplawski wrote:
I package plplot which ships bindings for oodles of languages, among
them perl and ocaml. The ocaml packaging guidelines suggest:
%global _use_internal_dependency_generator 0
%global __find_requires /usr/lib/rpm/ocaml-find-requires.sh
%global __find_provides /usr/lib/rpm/ocaml-find-provides.sh
to add the required ocaml Requires/Provides. However, this breaks the
automatic perl (and other?) generation for the perl sub-package.
How should this be handled? Is there a way to add the
ocaml-find-requires/provides to the normal list of providers? Shouldn't
this be done automatically by the build system?
Yes - really those should be pushed into upstream RPM. However that
isn't done at the moment.
The reason for having the alternate dependency generator is to
make dependencies of the form:
ocaml(Module) = MD5
where MD5 is the md5sum of the dependent Module's interface (use
'ocamlobjinfo plplot.cma' to discover this). This avoids the dreaded
'interface mismatch' error, and ensures that only a consistent set of
packages can be installed together, which is good news if you are
developing OCaml software that uses plplot.
If you are willing to have the occasional inconsistent package set,
you can just as easily forgo the above and simply add explicit
dependencies on any packages you need, plus the ABI, eg:
Requires: ocaml-foo
Requires: ocaml(runtime) = 3.11.1
This is still how Debian package things, although they are moving
slowly to a system which is similar (but different in the details)
from the one we use in Fedora. In Debian you still get 'interface
mismatch' errors.
Really we need to get the OCaml dep generator into upstream RPM ...
I seem to recall commenting on this earlier (like at least a year ago :)
but just as well I might've just intended to comment... anyway.
I would've pulled it to RPM upstream ages ago if it didn't have Fedora
packaging specifics bolted in:
if [ -n "$emit_compiler_version" ]; then
# Every OCaml program depends on the version of the
# runtime which was used to compile it.
echo "ocaml(runtime) = `cat /usr/lib*/ocaml/fedora-ocaml-release`"
fi
I suppose there's a reason why this is not generated with "ocaml -version"
or "ocamlrun -version" as needed?
- Panu -
_______________________________________________
Fedora-ocaml-list mailing list
Fedora-ocaml-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-ocaml-list