Re: ATTN: Changes to OCaml dependency generator for RPM 4.8 in Rawhide

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

 



On Wed, 16 Dec 2009, Richard W.M. Jones wrote:

Since RPM 4.8 (now in Rawhide / Fedora 13), the external dependency
generator that we used to ship with OCaml has now gone upstream into
RPM.  This is a Good Thing, thanks to the RPM maintainers for adding
this.

If you own an OCaml library package, then there are some simple
adjustments you need to make to your OCaml spec files _in Rawhide_.

First of all, remove any lines that are exactly like any of these:

 %define _use_internal_dependency_generator 0
 %global _use_internal_dependency_generator 0
 %define __find_requires /usr/lib/rpm/ocaml-find-requires.sh
 %global __find_requires /usr/lib/rpm/ocaml-find-requires.sh
 %define __find_provides /usr/lib/rpm/ocaml-find-provides.sh
 %global __find_provides /usr/lib/rpm/ocaml-find-provides.sh

Any remaining calls to ocaml-find-{requires,provides}.sh must be ones
which take parameters, and these need to be modified.

Change:

 %define __find_requires /usr/lib/rpm/ocaml-find-requires.sh <params...>
or:
 %global __find_requires /usr/lib/rpm/ocaml-find-requires.sh <params...>

to:

 %global __ocaml_requires %{_rpmconfigdir}/ocaml-find-requires.sh <params...>

Better yet, instead of overriding the __ocaml_requires (and _provides) macros, use the new option passing mechanism. See below...


and the same for "provides" instead of "requires".

For example, if your original spec files contained this block:

 %define _use_internal_dependency_generator 0
 %define __find_requires /usr/lib/rpm/ocaml-find-requires.sh -i Asttypes -i Parsetree
 %define __find_provides /usr/lib/rpm/ocaml-find-provides.sh

then following the rules above it would become:

 %global __ocaml_requires %{_rpmconfigdir}/ocaml-find-requires.sh -i Asttypes -i Parsetree

With the new rpm, all you need to have in the spec for this case is:

%global __ocaml_requires_opts -i Asttypes -i Parsetree

These will get passed to __ocaml_requires automatically when it runs, and similarly to pass options to provides script, define __ocaml_provides_opts macro to your liking.

Oh and this is not ocaml-specific, any of the __foo_requires / __foo_provides helpers accept options in the same manner.

	- Panu -

--
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux