Search:  
Gentoo Wiki

TIP_New_/etc/portage_layout

This article is part of the Tips & Tricks series.
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.

  1. Move your package.* files to a temporary directory.
  2. Replace each package.* file with a directory of the same name. For example, mkdir /etc/portage/package.use.
  3. 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:

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.

Retrieved from "http://www.gentoo-wiki.info/TIP_New_/etc/portage_layout"

Last modified: Wed, 26 Dec 2007 15:35:00 +0000 Hits: 6,290