Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to use the ~amd64 test branch for dev-ruby/* packages.

share|improve this question
up vote 1 down vote accepted

The official Gentoo documentation says that you should add the desired packages (and versions, if needed) at /etc/portage/package.keywords. Look at these examples:

# This will accept any ~arch version:
# This will accept only this specific version:
# This will accept all versions that start with "1.2.0"
# This will accept any version below 1.3

Thus, you should get a list of the packages you want to install, and add them to this file. There is no way to get all packages from a category, you must explicitly list each one.

share|improve this answer

Use gem to manage ruby related packages might be a better solution.

share|improve this answer

You can use eix to get list all packages in a single category.

emerge eix

Then run eix-update to update the eix database.

Once eix is up to date, here's a oneliner that will do what you're asking:

eix dev-ruby/ | grep "dev-ruby/" --after 1 | grep "~" --before 1 | awk -F"*" '/dev-ruby/{print $2" ~amd64"}' | sed -e 's/^[ \t]*//g' | tee -a /etc/portage/package.keywords

And just to make sure it's adding the right stuff, you can use this one instead prior to using the one above, as a test:

eix dev-ruby/ | grep "dev-ruby/" --after 1 | grep "~" --before 1 | awk -F"*" '/dev-ruby/{print $2" ~amd64"}' | sed -e 's/^[ \t]*//g' | tee -a /dev/null
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.