| 1 |
<?xml version='1.0' encoding='UTF-8'?>
|
| 2 |
<!DOCTYPE sections SYSTEM "/dtd/book.dtd">
|
| 3 |
|
| 4 |
<!-- The content of this document is licensed under the CC-BY-SA license -->
|
| 5 |
<!-- See http://creativecommons.org/licenses/by-sa/2.0 -->
|
| 6 |
|
| 7 |
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-portage-diverttree.xml,v 1.9 2005/11/27 01:43:35 neysx Exp $ -->
|
| 8 |
|
| 9 |
<sections>
|
| 10 |
|
| 11 |
<version>1.4</version>
|
| 12 |
<date>2005-11-25</date>
|
| 13 |
|
| 14 |
<section>
|
| 15 |
<title>Using a Portage Tree Subset</title>
|
| 16 |
<subsection>
|
| 17 |
<title>Excluding Packages/Categories</title>
|
| 18 |
<body>
|
| 19 |
|
| 20 |
<p>
|
| 21 |
You can selectively update certain categories/packages and ignore the other
|
| 22 |
categories/packages. We achieve this by having <c>rsync</c> exclude
|
| 23 |
categories/packages during the <c>emerge --sync</c> step.
|
| 24 |
</p>
|
| 25 |
|
| 26 |
<p>
|
| 27 |
You need to define the name of the file that contains the exclude patterns in
|
| 28 |
the <c>RSYNC_EXCLUDEFROM</c> variable in your <path>/etc/make.conf</path>.
|
| 29 |
</p>
|
| 30 |
|
| 31 |
<pre caption="Defining the exclude file in /etc/make.conf">
|
| 32 |
RSYNC_EXCLUDEFROM=/etc/portage/rsync_excludes
|
| 33 |
</pre>
|
| 34 |
|
| 35 |
<pre caption="Excluding all games in /etc/portage/rsync_excludes">
|
| 36 |
games-*/*
|
| 37 |
</pre>
|
| 38 |
|
| 39 |
<p>
|
| 40 |
Note however that this may lead to dependency issues since new, allowed packages
|
| 41 |
might depend on new but excluded packages.
|
| 42 |
</p>
|
| 43 |
|
| 44 |
</body>
|
| 45 |
</subsection>
|
| 46 |
</section>
|
| 47 |
<section>
|
| 48 |
<title>Adding Unofficial Ebuilds</title>
|
| 49 |
<subsection>
|
| 50 |
<title>Defining a Portage Overlay Directory</title>
|
| 51 |
<body>
|
| 52 |
|
| 53 |
<p>
|
| 54 |
You can ask Portage to use ebuilds that are not officially available through the
|
| 55 |
Portage tree. Create a new directory (for instance
|
| 56 |
<path>/usr/local/portage</path>) in which you store the 3rd-party ebuilds. Use
|
| 57 |
the same directory structure as the official Portage tree!
|
| 58 |
</p>
|
| 59 |
|
| 60 |
<p>
|
| 61 |
Then define PORTDIR_OVERLAY in <path>/etc/make.conf</path> and have it point to
|
| 62 |
the previously defined directory. When you use Portage now, it will take those
|
| 63 |
ebuilds into account as well without removing/overwriting those ebuilds the next
|
| 64 |
time you run <c>emerge --sync</c>.
|
| 65 |
</p>
|
| 66 |
|
| 67 |
</body>
|
| 68 |
</subsection>
|
| 69 |
<subsection>
|
| 70 |
<title>Working with Several Overlays</title>
|
| 71 |
<body>
|
| 72 |
|
| 73 |
<p>
|
| 74 |
For the powerusers who develop on several overlays, test packages before they
|
| 75 |
hit the Portage tree or just want to use unofficial ebuilds from various
|
| 76 |
sources, the <c>app-portage/gentoolkit-dev</c> package brings you
|
| 77 |
<c>gensync</c>, a tool to help you keep the overlay repositories up to date.
|
| 78 |
</p>
|
| 79 |
|
| 80 |
<p>
|
| 81 |
With <c>gensync</c> you can update all the repositories at once, or select just
|
| 82 |
a few of them. Each repository should have a <path>.syncsource</path> file in
|
| 83 |
the <path>/etc/gensync/</path> configuration directory which contains the
|
| 84 |
repository location, name, ID, etc.
|
| 85 |
</p>
|
| 86 |
|
| 87 |
<p>
|
| 88 |
Suppose you have two additional repositories called <c>java</c> (for the
|
| 89 |
in-development java ebuilds) and <c>entapps</c> (for the applications developed
|
| 90 |
in-house for your enterprise). You can update those repositories with the
|
| 91 |
following command:
|
| 92 |
</p>
|
| 93 |
|
| 94 |
<pre caption="Using gensync to update a few repositories">
|
| 95 |
# <i>gensync java entapps</i>
|
| 96 |
</pre>
|
| 97 |
|
| 98 |
</body>
|
| 99 |
</subsection>
|
| 100 |
</section>
|
| 101 |
<section>
|
| 102 |
<title>Non-Portage Maintained Software</title>
|
| 103 |
<subsection>
|
| 104 |
<title>Using Portage with Self-Maintained Software</title>
|
| 105 |
<body>
|
| 106 |
|
| 107 |
<p>
|
| 108 |
In some cases you want to configure, install and maintain software yourself
|
| 109 |
without having Portage automate the process for you, even though Portage
|
| 110 |
can provide the software titles. Known cases are kernel sources and nvidia
|
| 111 |
drivers. You can configure Portage so it knows that a certain package is
|
| 112 |
manually installed on your system. This process is called <e>injecting</e> and
|
| 113 |
supported by Portage through the
|
| 114 |
<path>/etc/portage/profile/package.provided</path> file.
|
| 115 |
</p>
|
| 116 |
|
| 117 |
<p>
|
| 118 |
For instance, if you want to inform Portage about
|
| 119 |
<c>vanilla-sources-2.6.11.6</c> which you've installed manually, add the
|
| 120 |
following line to <path>/etc/portage/profile/package.provided</path>:
|
| 121 |
</p>
|
| 122 |
|
| 123 |
<pre caption="Example line for package.provided">
|
| 124 |
sys-kernel/vanilla-sources-2.6.11.6
|
| 125 |
</pre>
|
| 126 |
|
| 127 |
</body>
|
| 128 |
</subsection>
|
| 129 |
</section>
|
| 130 |
</sections>
|