This is an old revision of the document!
Table of Contents
Portage
Portage is the package manager of Gentoo.
Dealing with most problems
A lot of problems during emerge
come from dependencies. Portage developpers are not perfect and can make errors when defining dependencies.
If emerge fails you can try :
- if you see that the error message is related to something, try to install this package before (eg opengl)
- install manually some of the dependencies before, it changes the order and can work
- if nothing works, unmerge all packages related to what you want (eg x11), or remove them from /usr/portage to force portage to reinstall them, and reinstall everything (that's what I had to do to install modular xorg).
Emerge step-by-step for modifying source
ebuild fluxbox fetch ; to download the package ebuild fluxbox unpack ; to uncompress the sources ; here you can modify sources ebuild fluxbox compile ; to compile ebuild fluxbox install ; to install (first part) ebuild fluxbox qmerge ; to install (second part) ebuild fluxbox clean ; to clean temporary folders
This is exactly equivalent to :
emerge fluxbox
Save an installed package
To save your package as it is installed :
quickpkg xorg-x11
To restore it (obliges emerge to use local binaries) :
emerge -K xorg-x11 #OR emerge --usepkgonly -a xorg-x11-6.8.2-r8
Updating config files
After an emerge, there is often a warning telling you that some config files need to be updated. The tool called etc-update
can help you to do this, by merging automatically what it can and asking your for the rest :
sudo etc-update
Clean your portage folder
If you do anything about it, your portage folder will grow along time. This is due to the distfiles
folder, where are stored all source tarballs of packages you have installed.
There is a portage tool called eclean
which can remove all useless tarballs while keeping interesting ones :
eclean --destructive distfiles
You can add the -p
option (pretend) if you just want to see what will be removed.
Compiling in RAM
If you have enough memory, it can be faster to compile directly in the memory instead of on the hard disk. For that, mount /tmp/portage
in a ram disk.