Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 387067

Summary: sys-apps/portage-2.2: sets/portage.conf should use a layer of indirection for implementation classes
Product: Portage Development Reporter: Zac Medico <zmedico>
Component: Core - ConfigurationAssignee: Portage team <dev-portage>
Status: CONFIRMED ---    
Severity: enhancement CC: esigra
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 144480    

Description Zac Medico gentoo-dev 2011-10-13 20:40:28 UTC
Currently, /usr/share/portage/config/sets/portage.conf contains direct references to the class names that implement the sets. This is inconvenient if any other package manager wants to support this type of configuration file (which would be required in order to know the whole content of @world if the user has sets in world_sets).

We can solve this if we add a new file that maps set type aliases to implementation classes, and having sets/portage.conf refer to the alias instead of the implementation class. For example, /usr/share/portage/config/sets_aliases/portage.conf could contain alias in the first column and implementation classes in the second column as follows:

container portage.sets.base.DummyPackageSet
world_file portage.sets.files.WorldSelectedSet
system_packages portage.sets.profiles.PackagesSystemSet
security_vuln portage.sets.security.NewAffectedSet
static_file portage.sets.files.StaticFileSet
Comment 1 Marius Mauch 2011-10-14 06:24:33 UTC
Before adding this please verify that other PMs actually *want* to support this type of config file (including variable expansion config values), otherwise it's just added complexity for nothing. For a really portable solution a new type of config file might be needed.