Hi, all.

Following the issue brought up in bug #508278
(${CHOST}-pango-querymodules not available on non-multilib systems),
I was thinking how to improve the wrapping conditionals so that it
would work best for both multilib and non-multilib systems, while
keeping it compatible with multilib-portage.

The underlying issue there is that multilib-portage has its own
executable wrapping that is incompatible with the wrapping done
by the eclass. For this reason, Tommy has requested the eclass wrapping
to be disabled when a single ABI is used (which multilib-portage
pretends to do) -- so that the binary would be simply installed for
further wrapping by multilib-portage.

Sadly, this means that ebuild authors have to consider two cases --
when ${CHOST}-executable is available, and when it is not. For most
of the multilib packages, autotools automatically find the correct
option. However, direct references in ebuild aren't that easy.

I think it would be better if ebuild authors would be able to use
${CHOST}-executable consistently for all systems. Therefore, I'd like
to make the wrapping code suitable for all the use cases, including
non-multilib systems and multilib-portage.


I'm proposing the following changes to the eclasses:

1. move wrapping conditionals from different eclasses into
multilib_prepare_wrappers and multilib_install_wrappers -- for improved
consistency and decreased amount of code,

2. replace the 'if at least two ABIs are built' conditional with plain
'if multilib-portage is not used' -- that is, enable the wrapping for
non-multilib systems. It may deem unnecessary but it doesn't hurt
and improves consistency.

3. add additional compatibility code for multilib-portage -- that
creates working '${CHOST}-executable -> executable' symlinks, utilizing
multilib-portage executable wrapping and providing compatibility with
both called names.

Patches sent as replies. What are your thoughts?

[1]:https://bugs.gentoo.org/show_bug.cgi?id=508278

-- 
Best regards,
Michał Górny

Attachment: signature.asc
Description: PGP signature

Reply via email to