TIP_New_/etc/portage_layout
Terminals / Shells • Network • X Window System • Portage • System • Filesystems • Kernel • Other |
Introduction
The 2.1 branch of Portage allows for a new way to handle the contents of /etc/portage. Essentially, the package.* files currently used can be converted into directories, and the files within those directories would act as if they were package.* files themselves. For example, instead of having all of your unmasked packages within the package.unmask file, you could make separate files for separate sets of packages, such as /etc/portage/package.unmask/kde, /etc/portage/package.unmask/gnome, etc.
Converting /etc/portage's Layout
Implementing the new layout is simple. In fact, the introduction almost explains the process itself.
- Move your package.* files to a temporary directory.
- Replace each package.* file with a directory of the same name. For example, mkdir /etc/portage/package.use.
- Finally, move each package.* file into their respective directory. For example, mv package.use /etc/portage/package.use/. Don't forget, the files themselves do not have to be called package.* anymore.
At this point, it would probably be a good idea to run emerge --pretend (with --verbose, if necessary) on any affected packages, just to make sure that the conversion was a success.
Key Points
Here's some things to keep in mind when using the new /etc/portage layout:
- This functionality does not apply towards /etc/portage/bashrc.
- Each package.* directory can hold multiple files, as well as subdirectories, sub-subdirectories, etc.
- Portage parses these files and directories in alphanumeric order (in the case of conflicting entries).
Also, Gentoo developers, overlay maintainers, and anybody else now have the ability to distribute these files along with their ebuilds to modify package settings as well as the settings for the package's dependencies. This should really come in handy for modular ebuilds.