Egencache
egencache is a tool that (re)builds metadata information for the Portage package database. By default the metadata corresponds to the Gentoo ebuild repository. It is built into Portage and therefore comes installed on every Gentoo system.
Metadata for the Portage package database comes included in Gentoo repository snapshots and, in most circumstances, can be re-downloaded by running an emerge --sync. It will not be downloaded when using git as the Portage sync method, which is more easily possible using repos.conf.
Installation
Every Gentoo system should have egencache installed. Run a quick test by issuing the the --help
option as seen in the usage section below.
If usage instructions are not displayed to the terminal there is certainly a problem. It is possible to (re)install Portage by following the Portage installation instructions.
Usage
Invocation
Use the -h
/--help
option to see the capabilities of egencache:
user $
egencache --help
Rebuilding the metadata cache
In order to rebuild the metadata cache on a system issue the following command:
root #
egencache --jobs=9 --update --repo gentoo
Adjust the number of jobs to be appropriate to each system. The "safe" metric to use with jobs will depend on the processor and system load; if there is no load on the system use the metric of one job per processor thread plus one. In a quad core processor that has two threads per core the equation would result in 9
being set for jobs (2*4+1). In the example above 9
jobs are used as the example.
Rebuilding the checksum cache can take quite some time. If running the egencache command hangs for a while just wait it out.
See also
- Elogv — a curses-based tool that parses the contents of elogs created by Portage.
- Useful Portage tools — provides a list of Gentoo-specific system management tools, notably for Portage, available in the ebuild repository.