Layman

The layman application is Gentoo's primary overlay management tool, offering centralized repository management for the end user.

With users can manage their overlays in a simple, centralized manner. The layman application provides an overview of available remote overlay repositories and allows the user to select one or more for his system. Once selected, the user can update the repositories (similar to emerge --sync), add his local overlays, and more.

Installing layman
Installing layman is a breeze. First check the USE flags that the layman package supports; most of the USE flags trigger which kinds of remote repository types layman supports (such as git repositories, cvs repositories ...). Then install the layman package

Next, edit  to include the following line (preferably at the top of the file):

This will ensure that Portage, when asked, will also check the content of the various overlays managed by layman. In effect, it will set the PORTDIR_OVERLAY variable, so if you already define that one in /etc/make.conf, make sure that you do not overwrite the value that layman already provides.

Using layman
The layman manual page (see Resources) provides a full overview of the available functions within layman. However, for most people, the following commands suffice for their overlay management activities.

To have a list of all the overlays, type:

To add an overlay in the list, type:

To remove an overlay from the local list, type:

To update all overlays, type:

Setting overlay priorities with layman
As each overlay is assigned a unique priority, layman provides a simple way of defining priorities for overlays it manages. For more information about overlay priorities see the overlay article.

The file  contains some information about the overlays, among which is the priority attribute in the repo tag. The number there determines only the priority relative to the other overlay entries, 50 is the default value. layman then analyses this file and sets the order of the overlay entries in the  variable defined in.

As the file  is automatically generated by layman based on the settings in , it is strongly recommended that only   is used to set the priorities.

Because layman generates the  variable in   which in such a way that the   variable from   is put at the end, all overlays defined in   take precedence over those defined by layman, provided the   variable is defined in   before   is sourced.

However, this can be also "fooled" by defining the  in   after you source

This "trick" is merely an opportunity offered by shell variable expansion.

Resources

 * Layman Homepage on Sourceforge.net
 * Gentoo Overlay's: Users Guide on Gentoo.org