Paludis Logo Introduction General Questions
Bugs, Requests, Support How do I ...?
Overview Operation
FAQ Stricter than Portage
Clients Things Paludis Does Differently
Configuration Repository Questions
API Upgrades, Old Bugs, Migration

FAQ: How do I ...?

Use ccache

To enable ccache, simply set the relevant variables in your configuration bashrc:

PATH="/usr/lib/ccache/bin/:${PATH}"
CCACHE_DIR="/var/tmp/ccache"
SANDBOX_WRITE="${SANDBOX_WRITE}:${CCACHE_DIR}"

You'll need to make sure that your ccache directory has appropriate permissions. Paludis will sometimes use the paludisbuild user when compiling. You can set the maxium size of the cache by running (for example) CCACHE_DIR="/var/tmp/ccache" ccache -M 2G once as root.

Use distcc

To enable distcc, simply set the relevant variables in your configuration bashrc:

DISTCC_DIR="/var/tmp/paludis/.distcc"
DISTCC_HOSTS="localhost another_host"
PATH="/usr/lib/distcc/bin:${PATH}"
SANDBOX_WRITE="${SANDBOX_WRITE}:${DISTCC_DIR}"

Specify default options

Often users want to specify certain options by default. Common choices include:

You can either use a shell alias, or export PALUDIS_OPTIONS="--options" (in your environment, not in the configuration bashrc).

Remove unneeded packages

Paludis has three ways of removing unused packages. You should always use --pretend and check the output before proceeding:

--uninstall-unused

For the purposes of --uninstall-unused, an installed package is used if any of these conditions are true:

  • It is matched by any dependency specification in any repository's system or world set.
  • It is depended upon by another used package.

This action will therefore flag any packages that are no longer in use, for example because they were only pulled in by a package that is no longer installed, or because they were required by an old version of a package but no longer are.

--uninstall --with-unused-dependencies

This action will uninstall a package, along with any of its dependencies that will no longer be used once the target package is removed.

This action is recursive, so if foo depends upon bar and bar depends upon baz, and if neither bar nor baz are otherwise required, uninstalling foo will also uninstall bar then baz.

--uninstall --with-dependencies

This action will uninstall a package, along with any other package that requires this package as a dependency. Again, this action is recursive.

Some important notes:

Unmask a Package

First, you need to determine how a package is masked. The easiest way to do this is to use paludis --query. Then, if you're sure you really want to unmask a package, and bearing in mind that doing so might break your system, you need to override the mask. How to do this depends upon the mask reasons:

keyword
You need to add an entry to your keywords.conf accepting one of the ebuild's keywords. The special -* keyword cannot be accepted this way; if an ebuild only has this in its keywords, report it to Gentoo bug 160519 and work around it by using *. An asterisk will also accept an ebuild with empty keywords.
user mask
Either remove your package_mask.conf entry or override it with package_unmask.conf.
profile mask
Override with package_unmask.conf.
repository mask
Override with package_unmask.conf.
eapi
You cannot override this mask. It indicates either a broken ebuild (if EAPI=unknown) or an ebuild not supported by your current version of Paludis.
license
Accept the appropriate licences in licenses.conf.
by association
Unmask the associated package. This mask reason is currently only used for old style virtuals.

Sync from CVS

Syncing from CVS requires use of either the cvs+pserver or the cvs+ssh protocol. The syntax for the configuration file line is sync = cvs+ssh://username@host:/path/to/cvsroot:modulename. As an example, for syncing with the gentoo repository via CVS, you would use sync = cvs+ssh://username@cvs.gentoo.org:/var/cvsroot:gentoo-x86.

Sync from a Gentoo tree snapshot

Syncing from a tarball requires the tar+http or tar+ftp protocol. You must also specify sync_options = --strip-components=1, as the Gentoo snapshots place everything under a subdirectory named portage. For example:

# Replace this with your favourite Gentoo mirror
sync = tar+ftp://my.favourite.mirror/gentoo/snapshots/portage-latest.tar.bz2
sync_options = --strip-components=1

Recover VDB

If you deleted /var/db/pkg by accident, you're pretty much screwed. So don't do that, and be more careful next time.

If you deleted /var/db/pkg on purpose, please install OS X and stop pestering us.

Remove Portage from my Gentoo installation

The short answer is that you can't.

Several Gentoo packages wrongly depend on Portage, several depend on Portage because they use it and there really is no reason to try. Just leave Portage installed.