TIP package.keywords
From Gentoo Linux Wiki
| Terminals / Shells • Network • X Window System • Portage • System • Filesystems • Kernel • Other |
Please format this article according to the guidelines and Wikification suggestions, then remove this notice {{Wikify}} from the article
This article is still a Stub. You can help Gentoo-Wiki by expanding it.
Tip by HerrZattacke
The Tip below is kind of outdated. If your system grows you might want to consider putting all the keyworded packages in one file.
Example: you want foo/foo to be keyworded but the dependency requires that foo/foobar and foo/barbar have to be keyworded too. Then you could either do as the Tip below suggested it or do the following.
# mkdir -p /etc/portage/package.keywords # yes we create a directory not a file!!! # echo "foo/foo" > /etc/portage/package.keywords/foo # the name for the file can be chosen freely # echo -e "foo/foobar \nfoo/barbar" >> /etc/portage/package.keywords/foo
You could also use it for package.use, package.unmask and so on.
You do not have to use the ~arch anymore unless you want to install a ~x86 package on an ~amd64 machine.
Tip by solka
Using the file /etc/portage/package.keywords is very simple. Just create the directory /etc/portage if it doesn't exist and touch package.keywords.
# mkdir /etc/portage # cd /etc/portage # touch package.keywords
Then you only have to add the package you want to add followed by the ~arch flag, for instance this is my file.
| File: /etc/portage/package.keywords |
## Beginning amule 2.0.0r2 dependencies >=sys-libs/zlib-1.2.1 ~x86 >=net-misc/curl-7.11.0 ~x86 >=x11-libs/wxGTK-2.4.2 ~x86 sys-devel/gdb ~x86 ## Miscellaneous dev-libs/libcoyotl ~x86 dev-libs/libevocosm ~x86 dev-lang/fpc ~x86 net-dialup/gammu ~x86 sys-devel/acovea ~x86 media-fonts/corefonts ~x86 =dev-ruby/rails-1.1* ~x86 ## xorg-x11 x11-base/xorg-x11 ~x86 x11-terms/xterm ~x86 sys-apps/utempter ~x86 media-video/nvidia-kernel ~x86 media-video/nvidia-glx ~x86 media-video/eselect-opengl ~x86 media-viedo/eselect ~x86 x11-wm/fluxbox ~x86 gnome-extra/gdesklets-core ~x86 media-gfx/gimp ~x86 >=x11-base/opengl-update-1.7 ~x86 ## Desklets x11-plugins/desklet-clock ~x86 x11-plugins/desklet-cornerxmms ~x86 x11-plugins/desklet-cpuinfo ~x86 x11-plugins/desklet-diskinfo ~x86 x11-plugins/desklet-goodweather ~x86 x11-plugins/desklet-ltvariations ~x86 x11-plugins/desklet-meminfo ~x86 x11-plugins/desklet-multitail ~x86 x11-plugins/desklet-networkinfo ~x86 x11-plugins/desklet-psidisplays ~x86 x11-plugins/desklet-psisensors ~x86 x11-plugins/desklet-starterbar ~x86 x11-plugins/desklet-sysinfo ~x86 x11-plugins/desklet-temperature ~x86 x11-plugins/desklet-weather ~x86 ## Others app-admin/torsmo ~x86 app-editors/vim ~x86 app-editors/vim-core ~x86 mail-client/sylpheed-claws-cvs ~x86 net-www/mozilla-firefox ~x86 sys-apps/athcool ~x86 |
You can also define the version of the package you want to add by simply specifying it and adding a = before the package, for instance
=x11-base/opengl-update-1.7 ~x86
You can use wildcards in the version in a similar fashion.
=dev-ruby/rails-1.1* ~x86
This will unmask versions 1.1.0, 1.1.1 etc. Note, this will not work if you put a period before the wildcard, i.e. =dev-ruby/rails-1.1.* ~x86
You can use the less < and major > symbols too in order to specify which versions you want to unmask.
>=x11-base/opengl-update-1.7 ~x86
<=x11-base/opengl-update-1.7 ~x86
You can use ~ in order to unmask a specific version as well as all revision bumps, for instance this will unmask firefox-0.9.1 as well as any future revisions such as -0.9.1-r1, -0.9.1-r2, etc. It will not unmask -0.9.2 or any other version.
~net-www/mozilla-firefox-0.9.1 ~x86
The package sys-kernel/linux-headers requires -* instead of ~x86, for instance
=sys-kernel/linux-headers-2.6.5 -*
There are two more keywords you can use: * means to unmask the package when it becomes stable on any architecture, and ~* means the same for unstable status. You would typically use those without a version specifier, for example for arch testing.
See http://forums.gentoo.org/viewtopic.php?t=171464 for more information.
It's simple, isn't it?
If you get tired editing packages.keywords and packages.use by hand, you can use flagedit instead. See HOWTO_Use_Portage_Correctly#TimeSavers
