Multiple Inheritance for Cascading Profiles

For a long time now, cascading profiles have served Gentoo for Mac OS X very well. For too long now, cascading profiles have been insufficient. Conflicting statements? I think not. Multiple inheritance for cascading profiles would solve a great deal of problems for the Gentoo for Mac OS X team.

I decided, with what’s effectively left of the team agreeing with me, that our ideal profile structure would be as follows:

default-darwin/macos/{10.{3,4},progressive/10.{3,4},standard/10.{3.4}}

The associated inheritance structure, apart from everything inheriting from ../, default-darwin/macos/{progressive,standard}/10.3 would inherit from default-darwin/macos/10.3 and default-darwin/macos/{progressive,standard}/10.4 would inherit from default-darwin/macos/10.4. Some profiles would be inherit-only, including default-darwin/{macos,macos/10.{3,4}}. This would enable us to isolate all of the profile data that is inherent to any 10.{3,4} system into one profile, and isolate all of the profile data that is inherent to any {progressive,standard} profile, and seamlessly fuse those two, with optional modifications/additions, via multiple inheritance.

Sounds really cool, but all this is currently impossible with the current implementation of cascading profiles. I propose that multiple inheritance be allowed and accounted for by portage. The only real argument I’ve heard against it is that it’d be difficult to implement collision resolution. I have a simple solution to that, too: order of precedence should be defined in the ‘parent’ file. Honestly, how hard to implement can that be?

Update: It seems that there are a number of people out there reading this that don’t know what progressive versus standard means in the Gentoo for Mac OS X context. To clarifty, progressive is our non-collision-protect profile, allowing for vendor-supplied files to be overwritten by portage, while standard is our collision-protect profile, preventing portage from overwriting vendor-supplied files.

0 Responses to “Multiple Inheritance for Cascading Profiles”


  1. No Comments

Leave a Reply