Search:  
Gentoo Wiki

TIP_Upgrade_Portage

This article is part of the Tips & Tricks series.
Terminals / Shells Network X Window System Portage System Filesystems Kernel Other

Contents

Introduction

Unless you know what you are looking for, you might have trouble figuring out how to upgrade portage. If you want a quick tip, you've found it. Additionally, look at http://www.gentoo.org/doc/en/gentoo-upgrading.xml for detailed information.

Install

A new version of portage needs to be installed. To install the latest version of portage for your system, run: emerge -a sys-apps/portage

Update System

Note: Profile changes are not normally required unless there is a profile upgrade (generally every 3 to 6 months). Portage will inform you with a message when this is required.

Now your system profile needs to be updated. Start by moving the old profile (so that you can check what it was later if needed, you can safely delete it when finished): cd /etc && mv make.profile make.profile.old

Now you replace the profile with the appropriate one in /usr/portage/profiles/

In general, the code looks like this, replacing <os>, <arch>, and <profile-version> with your own system architecture and desired profile version.

ln -s /usr/portage/profiles/<os>/<arch>/<profile-verision> make.profile

The current gentoo profile version as of this writing is 2008.0, and most people are upgrading an default linux x86 system with a 2.6 series kernel, I presume. In that case, we want to link /usr/portage/profiles/default-linux/x86/2008.0 to /etc/make.profile by:

ln -s /usr/portage/profiles/default-linux/x86/2008.0 make.profile

If you are still clinging to a 2.4 kernel, make sure you specify the 2.4 subdirectory in the link:

ln -s /usr/portage/profiles/default-linux/x86/2008.0/2.4 make.profile

The official Gentoo Upgrade guide has excellent information regarding which profile to select.

Compile new or updated packages

A new profile may come with a new set of default packages or use flags in the base system. When switching to a new profile, it's a good idea to:

emerge -uavDN system

Additional Information

Gentoo Upgrade Documentation: http://www.gentoo.org/doc/en/gentoo-upgrading.xml

This article is still a Stub. You can help Gentoo-Wiki by expanding it.

Retrieved from "http://www.gentoo-wiki.info/TIP_Upgrade_Portage"

Last modified: Tue, 29 Apr 2008 10:37:00 +0000 Hits: 23,442