Disclaimer : This handbook has been replaced by a newer version and is not maintained anymore.


[ << ] [ < ] [ Home ] [ > ] [ >> ]


5. Diverting from the Official Tree

Content:

5.a. Using a Portage Tree Subset

Excluding Packages/Categories

You can selectively update certain categories/packages and ignore the other categories/packages. We achieve this by having rsync exclude categories/packages during the emerge --sync step.

You need to define the name of the file that contains the exclude patterns in the PORTAGE_RSYNC_EXTRA_OPTS variable in your /etc/portage/make.conf.

Code Listing 1.1: Defining the exclude file in /etc/portage/make.conf

PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_excludes"

Code Listing 1.2: Excluding all games in /etc/portage/rsync_excludes

games-*/*

Note however that this may lead to dependency issues since new, allowed packages might depend on new but excluded packages.

5.b. Adding Unofficial Ebuilds

Defining a Portage Overlay Directory

You can ask Portage to use ebuilds that are not officially available through the Portage tree. Create a new directory (for instance /usr/local/portage) in which you store the 3rd-party ebuilds. Use the same directory structure as the official Portage tree!

Then define PORTDIR_OVERLAY in /etc/portage/make.conf and have it point to the previously defined directory. When you use Portage now, it will take those ebuilds into account as well without removing/overwriting those ebuilds the next time you run emerge --sync.

Working with Several Overlays

For the powerusers who develop on several overlays, test packages before they hit the Portage tree or just want to use unofficial ebuilds from various sources, the app-portage/layman package brings you layman, a tool to help you keep the overlay repositories up to date.

First install and configure layman as shown in the Overlays Users' Guide, and add your desired repositories with layman -a <overlay-name>.

Suppose you have two repositories called java (for the in-development java ebuilds) and entapps (for the applications developed in-house for your enterprise). You can update those repositories with the following command:

Code Listing 2.1: Using layman to update all repositories

# layman -S

For more information on working with overlays, please read man layman and the layman/overlay users' guide.

5.c. Non-Portage Maintained Software

Using Portage with Self-Maintained Software

In some cases you want to configure, install and maintain software yourself without having Portage automate the process for you, even though Portage can provide the software titles. Known cases are kernel sources and nvidia drivers. You can configure Portage so it knows that a certain package is manually installed on your system. This process is called injecting and supported by Portage through the /etc/portage/profile/package.provided file.

For instance, if you want to inform Portage about gentoo-sources-2.6.11.6 which you've installed manually, add the following line to /etc/portage/profile/package.provided:

Code Listing 3.1: Example line for package.provided

sys-kernel/gentoo-sources-2.6.11.6

[ << ] [ < ] [ Home ] [ > ] [ >> ]


Print

View all

Page updated November 12, 2012

Summary: "Diverting from the Official Tree" gives you some tips and tricks on how to use your own Portage tree, how to synchronise only the categories you want, inject packages and more.

Sven Vermeulen
Author

Grant Goodyear
Author

Roy Marples
Author

Daniel Robbins
Author

Chris Houser
Author

Jerry Alexandratos
Author

Seemant Kulleen
Gentoo x86 Developer

Tavis Ormandy
Gentoo Alpha Developer

Jason Huebel
Gentoo AMD64 Developer

Guy Martin
Gentoo HPPA developer

Pieter Van den Abeele
Gentoo PPC developer

Joe Kallar
Gentoo SPARC developer

John P. Davis
Editor

Pierre-Henri Jondot
Editor

Eric Stockbridge
Editor

Rajiv Manglani
Editor

Jungmin Seo
Editor

Stoyan Zhekov
Editor

Jared Hudson
Editor

Colin Morey
Editor

Jorge Paulo
Editor

Carl Anderson
Editor

Jon Portnoy
Editor

Zack Gilburd
Editor

Jack Morgan
Editor

Benny Chuang
Editor

Erwin
Editor

Joshua Kinard
Editor

Tobias Scherbaum
Editor

Lars Weiler
Editor

Jochen Maes
Editor

Xavier Neys
Editor

Joseph Jezak
Editor

Joshua Saddler
Editor

Gerald J. Normandin Jr.
Reviewer

Donnie Berkholz
Reviewer

Ken Nowack
Reviewer

Donate to support our development efforts.

Copyright 2001-2014 Gentoo Foundation, Inc. Questions, Comments? Contact us.
{"cc_re__cc_re__cc_by_sa_2_5": ["oc/en/handbook/2007.0/handbook-ppc.xml?part=2\">&lt;&lt;</a> ]\n        \n          [ <a href=\"/doc/en/handbook/2007.0/handbook-ppc.xml?part=3&amp;chap=4\">&lt;</a> ]\n        \n      [ <a href=\"/doc/en/handbook/2007.0/handbook-ppc.xml\">Home</a> ]\n      \n            [ &gt; ]\n          \n            [ <a href=\"/doc/en/handbook/2007.0/handbook-ppc.xml?part=4\">&gt;&gt;</a> ]\n          </p>\n<hr>\n<p class=\"copyright\">\n\tThe contents of this document, unless otherwise expressly stated, are licensed under the <a href=\"http://creativecommons.org/licenses/by-sa/2.5\">CC-BY-SA-2.5</a> license. The <a href=\"/main/en/name-logo.xml\"> Gentoo Name and Logo Usage Guidelines </a> apply.\n  </p>\n<!--\n  <rdf:RDF xmlns=\"http://web.resource.org/cc/\"\n      xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n  \n  <license rdf:about=\"http://creativecommons.org/licenses/by-sa/2.5/\">\n    \n     <permits rdf:resource=\"http://web.resource.org/cc/Reproduction\" />\n     <permits rdf:resource=\"http://web.resource.org/cc/Distribution\" />\n     <requires rdf:resource=\"http://web.r"], "copyright__copyright__copyright": ["y\nEditor\n\nJorge Paulo\nEditor\n\nCarl Anderson\nEditor\n\nJon Portnoy\nEditor\n\nZack Gilburd\nEditor\n\nJack Morgan\nEditor\n\nBenny Chuang\nEditor\n\nErwin\nEditor\n\nJoshua Kinard\nEditor\n\nTobias Scherbaum\nEditor\n\nLars Weiler\nEditor\n\nJochen Maes\nEditor\n\nXavier Neys\nEditor\n\nJoseph Jezak\nEditor\n\nJoshua Saddler\nEditor\n\nGerald J. Normandin Jr.\nReviewer\n\nDonnie Berkholz\nReviewer\n\nKen Nowack\nReviewer\n\nDonate to support our development efforts.\n\nCopyright 2001-2014 Gentoo Foundation, Inc. Questions, Comments? Contact us.", "y\nEditor\n\nJorge Paulo\nEditor\n\nCarl Anderson\nEditor\n\nJon Portnoy\nEditor\n\nZack Gilburd\nEditor\n\nJack Morgan\nEditor\n\nBenny Chuang\nEditor\n\nErwin\nEditor\n\nJoshua Kinard\nEditor\n\nTobias Scherbaum\nEditor\n\nLars Weiler\nEditor\n\nJochen Maes\nEditor\n\nXavier Neys\nEditor\n\nJoseph Jezak\nEditor\n\nJoshua Saddler\nEditor\n\nGerald J. Normandin Jr.\nReviewer\n\nDonnie Berkholz\nReviewer\n\nKen Nowack\nReviewer\n\nDonate to support our development efforts.\n\nCopyright 2001-2014 Gentoo Foundation, Inc. Questions, Comments? Contact us."]}