Gentoo Wiki








Intro & Disclaimer

Occasionally, about every six months, GNOME releases an update to its desktop platform by bumping its minor number (2.16 --> 2.18, for example). It's at this point that the Gentoo developers start testing this brand new release for things that don't work, in case the GNOME developers miss a bug that the Gentoo Devels can fix, or simply to keep the bad stuff out.

This HOWTO is to teach you how to say "Gee, thanks Gentoo Developers, but I'll try GNOME out on my own".

Unmasking the Hard-Masked Packages


The first thing you need to do is unmask the masked packages. To do that, look inside the file:


Inside you'll find a section that starts with:

File: /usr/portage/profiles/package.mask
# The Great GNOME 2.18.0 mask

and ends with

# End of GNOME 2.18.0 mask


This is incredibly easy. Just use sed:

For GNOME 2.16 use the following code:sed:
sed -n '/GNOME 2.16 mask for testing/,/End GNOME 2.16 mask/p' /usr/portage/profiles/package.mask >> /etc/portage/package.unmask

For upgrading to GNOME 2.18 : sed:

sed -n '/The Great GNOME 2.18.0 mask/,/End of GNOME 2.18.0 mask/p' /usr/portage/profiles/package.mask >> /etc/portage/package.unmask

For upgrading to GNOME 2.20 : sed:

sed -n '/The Great GNOME 2.20 mask/,/End The Great GNOME 2.20 mask/p' /usr/portage/profiles/package.mask >> /etc/portage/package.unmask

Additionally you might have to unmask the following packages manually:


Script Way

If you want to use a script, you can check out TIP Mass Unmasking.

"Unstable" systems (ie, ~amd64, ~x86, etc.)

If you are running an unstable (~x86, ~amd64, etc.) system, you can now just type emerge -DuN gnome.

If all goes well, the new GNOME desktop will start to emerge. If you have problems, especially with packages blocking each other, you may wish to skip down to the section Unmerge Outdated Packages below.

"Stable" systems (ie, amd64, x86, etc.)

Gnome 2.16 requires unstable packages to be allowed to emerge. The best way to give portage permission to install those unstable packages is to add those unstable packages to your /etc/portage/package.keywords file.

Note: While it is possible to use a command like ACCEPT_KEYWORDS="~x86" emerge gnome to emerge Gnome, this is strongly discouraged. For one thing, this may lead to system instability. Also, Gnome will revert to the previous version next time you emerge world.

Add Newly Unmasked Packages to package.keywords

The first group of files you'll need to list are precisely the same ones you just unmasked in /etc/portage/package.unmask.

So paste that same long list from before into /etc/portage/package.keywords.

The format of this file is slightly different than for /etc/portage/package.unmask, so you'll need to adjust the format of those lines. Again, using your favorite text editor, change the format of the lines:

File: /etc/portage/package.unmask

(Someone testing this walkthrough for me asked "why do you need the >= at the beginning? None of my other package.keyword entries have it!?" The answer is that the >= specifies that you want to use a particular version of the package... or higher. You'll notice that the other entries don't specify a version. See the portage manual, which discusses this, by running man portage.)

Here is an example of the file done for you. (Note: the content of /usr/portage/profiles/package.mask may have changed since this list was created, so it may be best to manually create this yourself so it is up to date. Still, this is provided as an example.)

File: /etc/portage/package.keywords
#Gnome-2.18 mask
>=gnome-base/gnome-2.18 ~x86
#End of gnome-2.18 mask

A Quick Way to Add Packages to package.keywords

Here is a quick way to add the same packages you just unmasked to your package.keywords file. Just remember to replace the ~x86 with your architecture if necessary.

Code: fast way to add package.keywords
sed -n '/The Great GNOME 2.18.0 mask/,/End of GNOME 2.18.0 mask/p' /usr/portage/profiles/package.mask | awk '{print $1 " ~x86"}' >> /etc/portage/package.keywords

Add Other Required Packages to package.keywords

Now that you've (1) unmasked the hard masked Gnome packages and (2) added them to package.keywords, you're ready to emerge gnome! EXCEPT... there are likely to be some packages required by Gnome that are experimental/unstable! You need to add THOSE packages to package.keywords too.

Note: Since gnome-2.16 is no longer masked and in the stable tree, this is all that will be necessary for stable installs.

In the past this was a time consuming process, but fortunately, we've had a awk/sed wiz paste this in:

Code: fast way to add package.keywords
ACCEPT_KEYWORDS="~x86" emerge -p =gnome-base/gnome-2.16* | grep \\[ebuild | awk '{ print $4 }' | sed -e 's/^/~/' -e 's/-r[0-9]{1,2}//' | uniq -u | sort >> /etc/portage/package.keywords

(You may need to replace "~x86" above with "~amd64" or another architecture if necessary.)

Unmerge Outdated Packages

So you unmasked Gnome's files, got package.keywords all up-to-date, and you've emerge -DuNpv gnome'd successfully. Well, if you're like me, when you emerged gnome, you got a weird error like this:

Code: emerge -DuNpv gnome
These are the packages that I would merge, in order:

Calculating dependencies ...done!
[blocks B     ] <=x11-themes/gnome-themes-2.8.2 (is blocking x11-themes/gtk-engines-2.6.2)
[blocks B     ] <app-admin/gnome-system-tools-1.1.91 (is blocking app-admin/system-tools-backends-1.2.0) 

Looks like some of the packages have been replaced in the new Gnome. The solution? emerge --unmerge gnome-themes gnome-system-tools

Emerge Gnome

And now, finally...

emerge -DuN gnome

Note: If you're compiling from within Gnome, you might want to shut off your screensaver to save the cpu some unnecessary cycles while it's compiling.

After that finishes, due to the fact that libraries commonly get shuffled around in these version bumps, it's usually a good idea to run revdep-rebuild. If you don't have revdep-rebuild, then emerge gentoolkit.

When you're all done, hours later, don't forget to run etc-update or dispatch-conf.

Then after you've updated all the configuration files the new gnome will use, quit gnome and restart!


Further Information

Gnome 2.12

Gnome 2.14

Gnome 2.16

Gnome 2.18

Retrieved from ""

Last modified: Sat, 06 Sep 2008 22:01:00 +0000 Hits: 48,898