I think Chapter 7 is unclear wrt inherit in few ways: - it doesn't say that you can call inherit at most once (?) per ebuild/eclass and with one or more eclasses - I think it should specify the order of loading (in the order after inherit, eclasses inherited by first specified eclass are recursively loaded before second eclass etc) - related to this, "INHERITED metadata variable contains the name of every eclass used" - what's "used", isn't it "loaded so far?" - what happens if eclass is attempted to be loaded more than once - maybe make clear that EXPORT_FUNCTIONed phase may be overriden by later eclass wrt the load order, then ebuild
- i dont think there's anything wrong with calling "inherit" more than once ... in fact, it's useful in some cases to keep code clean ... the phrasing should be that it's highly recommended that all inherited eclasses be specified at the top of the ebuild/eclass and that all relevant eclasses be inherited in one line the rest seems common sense (but should be OK to codify): - nothing wrong with inheriting more than once - variables that arent accumulated are always set to the last value while variables that are accumulated get done logically so - functions get inherited/overridden in logical order
Yeah, inherit multiple times is useful if you need to do conditionals on, say, ${PN}.
r140 should be a bit better.