On Fri, 30 Sep 2011 22:27:57 +0200 (CEST) Elias Pipping <[email protected]> wrote: > I'd like to point out a problem with default(). > > [snip] > > What if we require two such exlibs? Then we end up calling default > twice. That's in general not desirable: In the case of src_prepare > e.g., if DEFAULT_SRC_PREPARE_PATCHES is non-empty, those patches will > be applied twice!
This isn't specifically a problem with default. It also happens if you've got exlibs a and b, each of which use a phase from exlib c. The reason it happens is that exlibs currently pretty much follow Gentoo's eclass model. Gentoo's eclass model, as the name sort of suggests, was designed in a weird way with the idea that ebuilds were objects that would inherit from various classes in some way (except that they're not, and they don't). So you could say that this is the multiple inheritance diamond problem in disguise, so long as you don't define your terms too precisely. > What should we do about this? We've discussed "triggered exlibs" in the past (ticket 1010). The idea being that rather than or as well as defining phase functions, exlibs can define things to be run during a particular phase. Presumably some kind of ordering would be required too. I'd like to see if people can come up with examples and sanity check the idea... -- Ciaran McCreesh
signature.asc
Description: PGP signature
_______________________________________________ Exherbo-dev mailing list [email protected] http://lists.exherbo.org/mailman/listinfo/exherbo-dev
