Upgrading Gentoo/de

Dieses Dokument erklärt, wie neue Gentoo Releases existierende Installationen beeinflussen.

It is important to keep Gentoo up to date. In addition to the need to have the latest security patches, Gentoo installations can get too out of sync with the current version and sometimes become complex to update.

About Gentoo architecture and upgrades
Gentoo differs from most other Linux distributions when it comes to updates. Most distributions have regular releases, every few months or years, which can be anticipated events for some distributions.

Gentoo, by contrast, is a rolling release distribution. There is no need to wait for a release to come out in order to get the latest version of packages - software can be installed as soon as it becomes stable. Gentoo was designed from the beginning around this concept of fast, incremental updates, and there are frequent updates to Gentoo software, with new and updated packages most days. Further information on Gentoo specifics can be found in the, about and.

Idealerweise installieren Benutzer eine Software einmal und kümmern sich nicht mehr um Releases: Folge einfach den Schritten im Eine Einführung in Portage im Gentoo Handbuch, wo erklärt wird, wie man sein System aktuell hält. Während dies der herkömmliche Weg ist, müssen ab und an Änderungen am System vorgenommen werden, welche Handarbeit benötigen.

In rare cases, changes made to the core system, to certain packages, , or certain updates of, may require manual intervention during or after an update. A will be published in such critical cases and/or will be signaled after a. Always read and follow the news items and Portage messages.

Profiles are central to a Gentoo system because they can define core system functionality, and new profiles are made available when there are fundamental changes to the way Gentoo works. A profile is, according to the intended use of the system and is usually only changed if necessary, or for an update.

Pakete aktualisieren
The has detailed information on  and on. See for more detailed information. See for complete information on how to use  to synchronize repositories.

To update all installed packages to the latest available versions, first with :

Or, for short:

This may output messages that should be read and followed, notably the previously mentioned. If config file updates are pending from a previous update, it may remind to.

Run to update the whole system, with dependencies:

Or, with short options:

may be used in place of, though with this option some USE flags may no longer reflect the current state of those in the Gentoo repository. can be used to update build time dependencies also.

If Portage reports dependency issues, sometimes using the  (or an even higher number) can help. By default, Portage has a relatively low limit on how far it tries to resolve dependencies (for performance reasons), occasionally it is not enough.

Any configuration file changes should be addressed, this can be managed by :

Cleaning up after an update
After the update, Portage recommends running. Be very careful running, it can remove important packages (e.g. kernel sources or optional dependencies when an alternative gets merged).

Profile updating instructions
When a new profile is available, Portage will inform the user with a (recent news items are listed on the website).

If a system is too old, it may be non trivial to, it may even be easier to start from scratch.

Generally, it is not mandatory to switch to a new profile when one comes out. Systems can continue to use their old profile, they won't stop working by staying on an old profile. However, Gentoo strongly recommends updating the profile if it becomes deprecated, as this means that Gentoo developers no longer plan on supporting it.

Profile updates are executed manually. The way to update may vary significantly from profile to profile; it depends on how deep the modifications introduced in the new profile are. In the simplest case, users only have to use the tool to change the  symlink,  the worst case could be having to recompile the entire system from scratch, with significant reconfiguration (though changes are usually not too hard, and are well explained - the main thing to remember is to properly follow the instructions).

Exactly what is required to migrate to a new profile is detailed in the relevant news item.

General instructions
This is a generic outline of what is done to update a profile. As stated previously, specific instructions will be provided in a, for each new profile. A profile update often requires manual intervention, beyond just switching the profile version.

Switch profiles with eselect
Make sure have been read.

To switch profiles with the automatic tool, must be installed. The utility makes viewing and selecting profiles easy, without needing to create or remove symlinks by hand:

Switch profiles manually
Make sure have been read.

Changing profiles manually is still supported:

Updating to 17.1 profile
See the appropriate news item. At this point all installations should already be using the 17.1 profile, and migration could be difficult.

Updating to 17.0 profile
See the appropriate news item. At this point all installations should be using the 17.1 profile, and migration could be difficult.

Updating old systems
Sometimes, systems are too old to easily upgrade. It may be possible to manually update a very old system, but it may be better to start from scratch and copy system configuration an files from the old system to the new one.

Here is a rough guide to updating an old system. Another method can be found.

Synopsis
The idea with this upgrade approach is that we create an intermediate build chroot in which a recent stage3 is extracted. Then, using the tools available in the stage3 chroot we upgrade the packages on the live system.

Preparing the intermediate build chroot
Let's first create the intermediate build chroot location, say, and extract a recent stage3 archive into it.

Next, we create a mount point inside this chroot environment, on which we then bind-mount the live (old) environment.

So now the live (old) system is also reachable within. This will allow us to reach the live (old) system and update the packages even when chrooted inside the intermediate build chroot.

Network, chroot, and update
The new install needs to access the network, so copy over the network related information:

Now chroot into the intermediate build location, and start updating vital packages on the live system, until the live system can be updated from within the live system (rather than through the intermediate build chroot):

It may be a good idea to check that the profile and Portage configuration are compatible between the (old) live system and the chroot.

Now start building packages into the (old) live system. If Portage is old or missing, it is a good idea to start with that:

Keep this chrooted session open and try to update the (old) live system. When failures occur, use this chrooted session to update packages using the build tools available in the intermediate build chroot (which includes recent, , etc.). Tools can be added as needed to the build chroot.

For some installations it may be necessary to update configuration files in order to install new software. Make the changes in the chroot environment.

To get the system fully up-to-date before exiting the root, build the  set (all packages) into the (old) live system:

Once finished the system should now be up to date!