[Pkg-xen-devel] [PATCH 08/12] debian/rules: Disable OCAML build when cross-building
Elliott Mitchell
ehem+debian at m5p.com
Thu Sep 24 05:08:35 BST 2020
On Thu, Sep 17, 2020 at 05:13:10PM +0100, Ian Jackson wrote:
> Elliott Mitchell writes ("[PATCH 08/12] debian/rules: Disable OCAML build when cross-building"):
> > + install-{tools,docs} CONFIG_PV_SHIM=n OCAML_TOOLS=n
> ...
> > + @# OCAML doesn't work when cross-building
> > + if [ "$(DEB_BUILD_ARCH)" = "$(DEB_HOST_ARCH)" ]; then \
>
> You have this logic twice.
>
> How about defining BUILD_OCAML_TOOLS as a make variable ?
That depends on what you consider a sufficiently complex expression to
bother merging. "a = b" is a pretty simply expression to try to optimize
out, even if the names "a" and "b" are fairly long.
OTOH there is one spot where "OCAML_TOOLS=n" can be added in *one* place.
Apparently in that blind spot in the center of one's vision...
> > + $(MAKE) $(make_args_tools) DESTDIR=$t \
> > + install-{tools,docs} CONFIG_PV_SHIM=n ; \
> > + else \
> > + touch $t/etc/xen/oxenstored.conf ; \
> > + cp -l $t/usr/sbin/xl $t/usr/sbin/oxenstored ; \
> > + fi
>
> I don't understand this last part at all. You're making oxenstored a
> link to xl ?
>
> Why is simply passing OCAML_TOOLS=n to the upstream build,
> conditionally, not the right thing to do ? ISTM that that would be a
> lot simpler.
Actually kind of simple if you realize the appropriate place...
The else clause is still needed though. If someone had both a native
built package which included the OCAML bits, and a cross-built package
which omitted them xen-utils-common still needs oxenstored.conf and the
symbolic link to xen-utils-wrapper. Otherwise the wrapper for
`oxenstored` would be broken if the cross-built xen-utils-common package
was in use.
With a bit of clean-up you end up with the attached...
--
(\___(\___(\______ --=> 8-) EHM <=-- ______/)___/)___/)
\BS ( | ehem+sigmsg at m5p.com PGP 87145445 | ) /
\_CS\ | _____ -O #include <stddisclaimer.h> O- _____ | / _/
8A19\___\_|_/58D2 7E3D DDF4 7BA6 <-PGP-> 41D1 B375 37D0 8714\_|_/___/5445
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-debian-rules-Setup-use-of-noOCAML-profile.patch
Type: text/x-diff
Size: 2443 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-xen-devel/attachments/20200923/c907396d/attachment.patch>
More information about the Pkg-xen-devel
mailing list