Gentoo Tips & Tricks

Gentoo Tips & Tricks

February 3, 2010 13:13 0 comments
 
5 Kudos
Don't
move!

Here’s a list of tips and tricks that I learned / discovered during these years.

eix
eix is a very simple, clean and powerful tool that allows you to perform several tasks with absolute simplicity.

  • eix : it will search inside your package names. Can be parametrized in order to search in description, use regexp and so on. It’s faster than emerge and I largely prefer eix to emerge -s.
  • eix-sync : Instead of using emerge —sync you can use eix-sync to synchronize portage tree and then have a brief about what changed between your previous local portage snapshot and the just fetched one. Handful.
  • eix-test-obsolete: This tool is really unknown to many people. It’s very useful when you use mixed stable and testing packages on your system. Simply it checks your package.{keywords, use, mask, unmask} files/directories in order to tell you if you have something you don’t need written in there. Maybe you unmask a package, then you remove it and in package.keywords/unmask you leave an useless trace. eix-test-obsolete will tell you that.
  • eix-remote: Issued with the parameter update is one of the most useful tool I’ve ever had the pleasure to see. A little prologue before. As you might know, there are a lot of “other portage tree” (or rather, overlays) that contains tons of other ebuilds that don’t fit into portage official tree. One of the most annoying thing could happen to you, is when you want to search if another ebuild has been already written or you’re force to write one yourself. The eix-remote update command will be your very best friend. It fetches a “snapshot” of the indexes of almost all the overlays in the world, and allows you to search for an ebuild just issuing eix . In order to get rid of the “remote” database, just run eix-update and your portage cache will be restored.

package.*
You should know that /etc/portage/package.{keywords,unmask,use} can be files or directories. It’s very useful having those as directories if you largely use mixed stable/testing packages.

autounmask
It’s a clean, non-perfect tool that helps you unmasking packages dependancies. How many times did you echoed a package name inside package.keywords file discovering that the package needed a dep that needed an unmasked dep that needed an unmask dep .. and so on? This tools will simplify your lives because it will add automagically the required dependancies to package.keywords. It’s really nice since it auto-recognize whether you have package.* stuff as files and directories. For instance, if your package.keywords is a directory, it will create a file named ‘autounmask-package’ containing all the required unmasked dependancies.

lafilefixer
dev-util/lafilefixer is a tool that performs a scan on your system trying to fix up broken .la files. It somehow useful when you have redundant errors regarding those files.

revdep-rebuild
app-portage/gentoolkit contains a lot of useful tools (like eclean, equery, euse) and, of course, revdep-rebuild. It’s a great tool that saved my own ass so many times. Sometimes packages breaks. Is in their nature! So, how can I fix those packages? revdep-rebuild is the one you were looking for. It will check for every dependancies (straight and reversed) discovering if some package isn’t in good health. If that happens, it will automagically re-emerge it.