Build from an Ebuild

During the debug phase of an ebuild it might be useful to test the different steps one by one.

Digest

Every ebuild contains a digest file with MD5 hashes for all source tarballs. For ebuilds in Portage there is no need to rebuild this file. For ebuilds created or changed locally (in a Portage overlay), you need to re-hash in order to be able to use the ebuild.
ebuild /usr/local/portage/net-misc/sipxportlib/sipxportlib-3.0.1.ebuild digest

Unpack

To just unpack the package and apply any patches.
ebuild /usr/local/portage/net-misc/sipxportlib/sipxportlib-3.0.1.ebuild unpack
Note: patches are usually applied in the unpack phase, but this can be handled differently by every ebuild. Check the ebuild itself to make sure what unpack actually does.

Compile

Unpack and compile the ebuild without actually installing it.
ebuild /usr/local/portage/net-misc/sipxportlib/sipxportlib-3.0.1.ebuild compile

Install

Unpack, compile and install, but do not execute the post-installation hooks.
ebuild /usr/local/portage/net-misc/sipxportlib/sipxportlib-3.0.1.ebuild install

Emerge

Normal emerge (by exact version match).
emerge -av =net-misc/sipxportlib-3.0.1
mike – Mon, 2005 – 12 – 19 09:04