Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 483758 - multibuild.eclass: please support nested multibuilds
Summary: multibuild.eclass: please support nested multibuilds
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Low enhancement (vote)
Assignee: Michał Górny
Depends on:
Blocks: 530154
  Show dependency tree
Reported: 2013-09-05 15:50 UTC by Christoph Junghans
Modified: 2021-04-12 06:21 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Junghans gentoo-dev 2013-09-05 15:50:11 UTC
It would be nice if multibuild.eclass would support nested multibuilds.

This would be useful for example in the case, where multiple abis are build inside a multi-build (see sci-libs/fftw-3.3.3-r2::gentoo).

multibuild_foreach_variant multilib_foreach_abi some_fct
is basically two nested loops for MULTIBUILD_VARIANTS and hence the MULTIBUILD_VARIANT of the outer loop is not available in the inner loop anymore.

One solution could to support custom prefix for the loop variables, which fails back to MULTIBUILD_XXX if it is unset.

On a side note, if the abi loop would be outside
multilib_foreach_abi multibuild_foreach_variant some_fct
there would no problem as ${ABI} is always available, but currently this construction won't work at all.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-05-26 05:53:26 UTC
Well, I see two paths from here but I don't think we should take both. So either:

a) make use of multibuild.eclass transparent in multilib-build and distutils-r1. Both eclass would restore MULTIBUILD_VARIANT{,S} inside the loop so that they wouldn't interfere with the ebuild.

This would fix the issue but still support only one multibuild in an ebuild. Also some people may get confused when multibuild 'disappears' like this.

b) support explicit stacking of MULTIBUILD_VARIANT. ${MULTIBUILD_VARIANT} == ${MULTIBUILD_VARIANT[0]} will have the deepest multibuild (like it has one), and ${MULTIBUILD_VARIANT[n]} would go up.

In case of fftw, ${MULTIBUILD_VARIANT[1]} (or [-1]) could be used to obtain the eclass variant ([0] would be multilib-build). Immediate issue fixed, though having two nested multibuilds will still require extra effort to set MULTIBUILD_VARIANTS locally.
Comment 2 Christoph Junghans gentoo-dev 2015-02-08 20:03:58 UTC
There was a patch to add that functionality (see url), but it never got applied.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-02-08 20:15:28 UTC
Because nobody bothered to review it.
Comment 4 Michael Palimaka (kensington) gentoo-dev 2015-02-11 13:24:21 UTC
The patch looks fairly straightforward, and in the absence of any other feedback I suggest just committing it.
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-02-14 08:35:32 UTC
Did you test it with your ebuild? In any case, please do and confirm that it works for you ;).
Comment 6 Michael Palimaka (kensington) gentoo-dev 2015-02-19 09:04:54 UTC
I'm not sure if I'm doing it right or not, but I end up with two identical multilib MULTIBUILD_VARIANTs instead of one multilib and one custom.
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-02-19 16:35:02 UTC
Could you attach the patch you are using since I don't want to repeat the process of extracting it from gmane? And also your ebuild :). Then we can figure out what it was all about.
Comment 8 Gilles Dartiguelongue gentoo-dev 2015-05-24 16:35:19 UTC
Extracted from mailing list and commited to the gnome overlay for testing in spice-gtk:
Comment 9 Christoph Junghans gentoo-dev 2016-08-25 18:24:24 UTC
@eva: How is the testing going? Any problems?