On Sat, 02 Jan 2016 16:54:31 +0100 Gilles Dartiguelongue <e...@gentoo.org> wrote:
> Hello all, > > while working on bug #518422, I found out that while eclass calls the > relevant cache updates it has no idea whether or not it is called in a > multilib context or not. Hmm... what's the problem here ? What you seem to call "not a multilib context" is a multilib build with only one ABI. That's one of the points of inheriting the multilib eclasses. > Imho, this leads to avoidable human errors where one thinks eclass > will take care of lib dependent caches, which it does, but not for all > enabled ABIs which could lead to reduced functionality for non-native > ABIs. > > While it seems reasonable to call multilib_foreach_abi > gnome2_pkg_postinst for multilib enabled ebuilds, it is still not > ideal as it will call a lot of functions for no good reason. On the > other hand, checking environment variable set by multilib eclasses > does not seem like a robust solution. > > Is there any reasonable way to make phase functions aware of if they > are running in a multilib enabled ebuild to adjust their behavior ? Per the above, 'multilib_foreach_abi' seems just fine. Is there a real problem with it?