<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE sections SYSTEM "/dtd/book.dtd">

<!-- The content of this document is licensed under the CC-BY-SA license -->
<!-- See http://creativecommons.org/licenses/by-sa/2.0 -->

<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-portage-branches.xml,v 1.7 2005/04/07 01:41:33 vapier Exp $ -->

<sections>

<version>1.3</version>
<date>2005-04-05</date>

<section>
<title>Using One Branch</title>
<subsection>
<title>The Stable Branch</title>
<body>

<p>
The ACCEPT_KEYWORDS variable defines what software branch you use on your
system. It defaults to the stable software branch for your architecture, for
instance <c>x86</c>.
</p>

<p>
We recommend that you only use the stable branch. However, if you don't care
about stability this much and you want to help out Gentoo by submitting
bugreports to <uri>http://bugs.gentoo.org</uri>, read on.
</p>

</body>
</subsection>
<subsection>
<title>The Testing Branch</title>
<body>

<p>
If you want to use more recent software you can consider using the testing
branch instead. To have Portage use the testing branch, add a ~ in front of your
architecture.
</p>

<p>
For instance, to select the testing branch for the x86 architecture, edit
<path>/etc/make.conf</path> and set:
</p>

<pre caption="Setting the ACCEPT_KEYWORDS variable">
ACCEPT_KEYWORDS="~x86"
</pre>

<p>
If you update your system now, you will find out that <e>lots</e> of packages
will be updated. Mind you though: when you have updated your system to use the
testing branch there is usually no easy way back to the stable, official branch 
(except for using backups of course).
</p>

</body>
</subsection>
</section>
<section>
<title>Mixing Stable with Testing</title>
<subsection>
<title>The package.keywords file</title>
<body>

<p>
You can ask Portage to allow the testing branch for particular packages but use
the stable branch for the rest of the system. To achieve this, add the package
category and name you want to use the testing branch of in
<path>/etc/portage/package.keywords</path>. For instance, to use the testing
branch for <c>gnumeric</c>:
</p>

<pre caption="/etc/portage/package.keywords setting for gnumeric, full line">
app-office/gnumeric ~x86
</pre>

</body>
</subsection>
<subsection>
<title>Test Particular Versions</title>
<body>

<p>
If you want to use a specific software version from the testing branch but you
don't want Portage to use the testing branch for subsequent versions, you can
add in the version in the <path>package.keywords</path> file. In this case you
<e>must</e> use the = operator. You can also enter a version range 
using the &lt;=, &lt;, &gt; or &gt;= operators.
</p>

<p>
In any case, if you add version information, you <e>must</e> use an operator. If
you leave out version information, you <e>cannot</e> use an operator.
</p>

<p>
In the following example we ask Portage to accept gnumeric-1.2.13:
</p>

<pre caption="Enabling a particular gnumeric test verion">
=app-office/gnumeric-1.2.13 ~x86
</pre>

</body>
</subsection>
</section>
<section>
<title>Using Masked Packages</title>
<subsection>
<title>The package.unmask file</title>
<body>

<p>
When a package has been masked by the Gentoo developers and you still want to
use it despite the reason mentioned in the <path>package.mask</path> file
(situated in <path>/usr/portage/profiles</path> by default), add the
<e>exact</e> same line in <path>/etc/portage/package.unmask</path>. 
</p>

<p>
For instance, if <c>=net-mail/hotwayd-0.8</c> is masked, you can unmask it by
adding the exact same line in the <path>package.unmask</path> file:
</p>

<pre caption="/etc/portage/package.unmask">
=net-mail/hotwayd-0.8
</pre>

</body>
</subsection>
<subsection>
<title>The package.mask file</title>
<body>

<p>
When you don't want Portage to take a certain package or a specific version of a
package into account you can mask it yourself by adding an appropriate line to
<path>/etc/portage/package.mask</path>.
</p>

<p>
For instance, if you don't want Portage to install newer kernel sources than
<c>development-sources-2.6.8.1</c>, you add the following line to
<path>package.mask</path>:
</p>

<pre caption="/etc/portage/package.mask example">
&gt;sys-kernel/development-sources-2.6.8.1
</pre>

</body>
</subsection>
</section>
</sections>
