Yet Another Harring Random Notes File (henceforth known as YAHRF) portage.ebuild.ebuild_repository is unconfigured packages, with the reasoning that as a repo, it's not supposed to know about config crap (encapsulation); you wrap it with a configurator, which wraps the base package with configuration data, generated a flattened *depends, src_uri, license, keywords, etc. The issue is how to handle restrictions coming in that change the wrapper. ( ( x in use ) and AlwaysFalse ) || ( x not in use ) ^^^ how to handle this? Effectively the wrapper needs resetting, but that probably won't work perfectly either. need to break it down into a tree of non-modifying restrictions stack based cmatch? push/pop modifications? here's how we do it. running count of changes on a configurable pkg each restriction that holds sub restrictions (recursive, think AndRestrictionSet fex), grabs a counter from the pkg, if failed run, unwinds changes down to the level it saw, and pukes the pkg back if negate, or None