[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-dev
Subject:    Re: [gentoo-dev] The inherit-EXPORT_FUNCTIONS ordering problem
From:       Sam James <sam () gentoo ! org>
Date:       2021-08-29 18:57:54
Message-ID: 9F7EF01F-2E40-4CC0-9AB5-49AB5D9C0754 () gentoo ! org
[Download RAW message or body]

> On 29 Aug 2021, at 19:44, Michał Górny <mgorny@gentoo.org> wrote:
> 
> On Sun, 2021-08-29 at 14:41 -0400, Ionen Wolkens wrote:
>>> [snip]
>> 
>> If anything I'd personally prefer the rough opposite of this, in the
>> event multiple eclass export the same, have the package manager merge
>> them.
>> 
>> e.g. rather than have `inherit cmake xdg` run xdg_src_prepare over
>> cmake's, would export:
>> 
>> src_prepare() {
>> 	cmake_src_prepare
>> 	xdg_src_prepare
>> }
>> 
>> unless the ebuild redefines it (which I imagine would often be because
>> of optional support, e.g. use lua &&, or occasional incompatibilities)
>> 
>> Some ebuilds have special needs, but then there's all those generic
>> ebuilds that should stay nearly empty.
> 
> What about transitive inherits?  Say, foo.eclass inherits bar.eclass.
> Does that imply that the ebuild calls foo_src_prepare
> and bar_src_prepare, and the eclass has no way of overriding this?  What
> if the eclass needs bar_src_prepare called explicitly before or after
> its own src_prepare?

My expectation would be that the ebuild only called depth=1 exported
functions and it would be the responsibility of each eclass to call its own
inherits. But this becomes a problem with repeated inherits given our
phases aren't usually idempotent.

best,
sam


["signature.asc" (signature.asc)]

-----BEGIN PGP SIGNATURE-----

iQGTBAEBCgB9FiEEYOpPv/uDUzOcqtTy9JIoEO6gSDsFAmEr2LJfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDYw
RUE0RkJGRkI4MzUzMzM5Q0FBRDRGMkY0OTIyODEwRUVBMDQ4M0IACgkQ9JIoEO6g
SDuK4Af9FjXryvpp7ak18xm2gqYxwIuAMpSJzon/8AHK8apcBnw9YknPxExYazzs
WeW0X5XXWDg1796SNYQCgHs8pQbrILo8WkD6jgap6rCs4lb7UF7uEJFgghDKWHXk
7V3D7Tvrla8BPSFk3cyS1YgN3v2fAA35PvKx8SyYGkPWUrBPYDeMZE+I4oSodrVl
vVGPcD1tD/7ohE0RR9I+qJ7A50d7mUDddw7irPb2BrpZ9hPLPmRl/qc8XxFwWvM+
xsI2hCr2M3wB976MpUalUwGSgs9OBfRvSnF8c2W+n13HcNxo02WtANj2NAXRzibL
Vuj8RhpwVjsMom7YXSg7luzwEp2xaw==
=HtZp
-----END PGP SIGNATURE-----


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic