portage.package.ebuild._config.helper module

portage.package.ebuild._config.helper.ordered_by_atom_specificity(cpdict, pkg, repo=None)

Return a list of matched values from the given cpdict, in ascending order by atom specificity. The rationale for this order is that package.* config files are typically written in ChangeLog like fashion, so it’s most friendly if the order that the atoms are written does not matter. Therefore, settings from more specific atoms override those of less specific atoms. Without this behavior, settings from relatively unspecific atoms would (somewhat confusingly) override the settings of more specific atoms, requiring people to make adjustments to the order that atoms are listed in the config file in order to achieve desired results (and thus corrupting the ChangeLog like ordering of the file).

portage.package.ebuild._config.helper.prune_incremental(split)

Prune off any parts of an incremental variable that are made irrelevant by the latest occuring * or -*. This could be more aggressive but that might be confusing and the point is just to reduce noise a bit.