<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gentoo-upgrading.xml,v 1.8 2004/08/11 15:06:06 swift Exp $ -->

<guide link="/doc/en/gentoo-upgrading.xml">
<title>Gentoo Upgrading Guide</title>

<author title="Author">
  <mail link="g.guidi@sns.it">Gregorio Guidi</mail>
</author>

<abstract>
This document explains how new Gentoo releases affect existing installs.
</abstract>

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

<version>2.1</version>
<date>August 11, 2004</date>

<chapter>
<title>Gentoo and Upgrades</title>
<section>
<title>Philosophy</title>
<body>

<p>
Here in Gentoo land, the concept of upgrading is quite different compared to 
the rest of the Linux world.  You probably already know that we never got in 
touch with the "classic" way of upgrading software: waiting for a new release, 
downloading it, burning, putting it in the cdrom drive and then following the 
upgrade instructions.
</p>

<p>
You know (being a Gentoo user after all) that this process is extremely 
frustrating for power users that want to live on the bleeding edge.  Even power 
users from other distributions probably share the same feelings, given the 
popularity and spread of tools like apt or apt-rpm which make it 
possible to have quick and frequent updates.  However, no distibution is more 
suited than Gentoo to satisfy these kind of demanding users.  From the beginning, 
Gentoo was designed around the concept of fast, incremental updates.
</p>

<p>
Ideally, you install once and then do not to bother with releases:
just follow the instructions in
<uri link="/doc/en/handbook/handbook-x86.xml?part=2&amp;chap=2">Portage and
Software</uri> in the
<uri link="/doc/en/handbook/">Gentoo Handbook</uri> that explain how to keep
your system up to date.  While that's the way things usually go, sometimes 
changes are made to the core system which require updates to be done manually.
</p>

</body>
</section>
<section>
<title>Releases and Profiles</title>
<body>

<p>
A recurring question about the Gentoo release process is: "Why roll out new
releases frequently, if they are not intended to let users update software?".
There are various reasons:
</p>

<ul>
  <li>
    A new release means new LiveCDs with bugfixes and more features.
  </li>
  <li>
    A new release provides an updated set of GRP packages, so that users that
    choose "the fast way" to install (stage3 + precompiled packages) and end up
    with a system that is not outdated.
  </li>
  <li>
    Finally, a new release may, from time to time, implement some features that
    are incompatible with previous releases.
  </li>
</ul>

<p>
When a release includes new incompatible features, or provides a set of core
packages and settings that deeply modify the behavior of the system, we say 
that it provides a new <e>profile</e>.
</p>

<p>
A <e>profile</e> is a set of configuration files, stored in a subdirectory of
<path>/usr/portage/profiles/</path>, that describe things such as the ebuilds
that are considered <e>system</e> packages, the default USE flags, the default
mapping for virtual packages, and architecture that the system is running.
</p>

<p>
The profile in use is determined by the symbolic link
<path>/etc/make.profile</path>, which points to a subdirectory of
<path>/usr/portage/profiles</path> which holds the profile files.  For instance, 
the x86 2004.2 profile can be found at <path>/usr/portage/profiles/default-x86-2004.2</path> 
(old-style location) or at <path>/usr/portage/profiles/default-linux/x86/2004.2</path> (new-style
location).  With respect to new-style profile directories, note that the files in 
parent directories are part of the profile (and are therefore shared 
by different subprofiles).
</p>

<p>
Profiles obsoleted by new ones are kept in <path>/usr/portage/profiles</path>
along with the current ones, but they are marked as deprecated.  When that happens a
file named <path>deprecated</path> is put in the profile directory.  The content
of this file is the name of the profile that should be "upgraded to"; portage uses
this information to automatically warn you when you should update to a new profile.
</p>

<p>
There are various reasons that a new profile may be created: the release of new 
versions of core packages (such as <c>baselayout</c>, <c>gcc</c>, or <c>glibc</c>) 
that are incompatible with previous versions, a change in the default USE flags, or 
in the virtual mappings, or maybe a change in system-wide settings (such as defining 
udev to be the default manager for <path>/dev</path> instead of devfs).
</p>

</body>
</section>
</chapter>

<chapter>
<title>Keeping up with new releases</title>
<section>
<title>Releases without profile changes</title>
<body>

<p>
If a new Gentoo release is announced that does not include a new profile (such
as the 2004.1 release for x86), then you can safely pretend that it never 
happened :).
</p>

<p>
If you update your installed packages 
<uri link="/doc/en/handbook/handbook-x86.xml?part=2&amp;chap=2">as explained in
the Gentoo Handbook</uri>, then your system will be exactly the same as one
that has been installed using the new release.
</p>

</body>
</section>
<section>
<title>Releases with profile changes</title>
<body>

<p>
If a release introduces a new profile, you have the choice to migrate to the 
new profile.
</p>

<p>
Naturally, you are not forced to do so, and you can continue to use the old profile
and just update your packages
<uri link="/doc/en/handbook/handbook-x86.xml?part=2&amp;chap=2">as explained in
the Gentoo Handbook</uri>.
</p>

<p>
However, Gentoo strongly recommends updating your profile if it becomes deprecated.  
When this happens, it means that Gentoo developers no longer plan on supporting it.  
Using the table below, you can quickly check to see what profiles are currently supported.
</p>

<p>
If you decide to migrate to the new profile, then you will have to manually
perform the update.  The way you update may vary significantly from release to release; it 
depends on how deep the modifications introduced in the new profile.
</p>

<p>
In the simplest case you only have to change the <path>/etc/make.profile</path>
symlink, in the worst case you may have to recompile your system from scratch
while doing a neat voodoo dance.  Regardless, we will publish migration instructions 
as part of the release.  You can also find these instructions at the end of this guide.
</p>

</body>
</section>
<section>
<title>Supported profiles</title>
<body>

<p>
The following profiles are officially supported by Gentoo developers:
</p>

<table>
<tr>
  <th>Architecture</th>
  <th>Most recent profile</th>
  <th>Other supported profiles</th>
</tr>
<tr>
  <th>arm</th>
  <ti>2004.0</ti>
  <ti></ti>
</tr>
<tr>
  <th>amd64</th>
  <ti>2004.2</ti>
  <ti>2004.0</ti>
</tr>
<tr>
  <th>hardened-x86</th>
  <ti>2004.0</ti>
  <ti></ti>
</tr>
<tr>
  <th>hppa</th>
  <ti>2004.0</ti>
  <ti></ti>
</tr>
<tr>
  <th>ppc</th>
  <ti>2004.0</ti>
  <ti></ti>
</tr>
<tr>
  <th>mips</th>
  <ti>2004.1</ti>
  <ti>1.4</ti>
</tr>
<tr>
  <th>sparc</th>
  <ti>2004.0</ti>
  <ti>1.4</ti>
</tr>
<tr>
  <th>x86</th>
  <ti>2004.2</ti>
  <ti>2004.0, 1.4</ti>
</tr>
</table>

</body>
</section>
</chapter>

<chapter>
<title>Profile updating instructions</title>
<section>
<title>Updating to 2004.2</title>
<body>

<p>
To switch to the 2004.2 profile, point the <path>/etc/make.profile</path> symlink 
to the new location:
</p>

<pre caption="Updating the /etc/make.profile symlink">
<comment>substitute &lt;arch&gt; with your arch</comment>
# <i>rm /etc/make.profile</i>
# <i>ln -s ../usr/portage/profiles/default-linux/&lt;arch&gt;/2004.2 /etc/make.profile</i>
</pre>

<p>
<b>x86</b> - This profile changes the default X11 implementation from
<c>x11-base/xfree</c> to <c>x11-base/xorg-x11</c>.  This change only touches
the <e>default</e> value, and is only relevant for those who have not installed
an X server yet.  If you already have one installed, then it will not affect
you at all; you are free to switch from one X server to the other exactly as
before.
</p>

<p>
<b>amd64</b> - There are no fundamental changes from previous profiles, no
specific action needs to be performed.
</p>

</body>
</section>
<section>
<title>Updating to 2004.0</title>
<body>

<p>
To switch to the 2004.0 profile, point the <path>/etc/make.profile</path> symlink
to the new location:
</p>

<pre caption="Updating the /etc/make.profile symlink">
<comment>substitute &lt;arch&gt; with your arch</comment>
# <i>rm /etc/make.profile</i>
# <i>ln -s ../usr/portage/profiles/default-&lt;arch&gt;-2004.0 /etc/make.profile</i>
</pre>

<p>
<b>All archs</b> - There are no fundamental changes from previous profiles, no
specific action needs to be performed.
</p>

</body>
</section>
<section>
<title>Updating from profiles older than 1.4 to 1.4</title>
<body>

<p>
The instructions for this upgrade are quite complex, you can find them
<uri link="/doc/en/new-upgrade-to-gentoo-1.4.xml">here</uri>.
</p>

</body>
</section>
</chapter>

</guide>
