> On 29 Aug 2021, at 19:44, Michał Górny <[email protected]> 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
Description: Message signed with OpenPGP
