This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.

Please visit our production wiki at https://wiki.gentoo.org

portageq

From Gentoo Wiki (test)
Jump to:navigation Jump to:search

Resources

portageq is a tool to quickly query Portage information. It is primarily used by Gentoo developers in order to determine Portage configuration information.

Installation

Every Gentoo system should have portageq 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

user $portageq --help

Querying environment variables

Probably the only question users will have as they read through the help output above is the definition of eroot. eroot simply means the repository filesystem path (directory) and can be obtained by:

user $portageq envvar EROOT
/

Queryable Portage specific environmental variables are listed in /usr/portage/profiles/info_vars. The queryable user environment's environment variables can be shown using the env command.

Return the CONFIG_PROTECT variable value (should be a filesystem path):

user $portageq config_protect

Return the DISTDIR variable value (should be a filesystem path):

user $portageq distdir
/usr/portage/distfiles

Return the PKGDIR variable value (should be a filesystem path):

user $portageq pkgdir
/usr/portage/packages

Query repository information

To see a detailed list of repositories as configured in repos.conf, without any formatting:

user $portageq repos_config /

As before, but without details:

user $portageq get_repos /

Removal

Simply put, removing the package management system on Gentoo is a bad idea. Do not do it!

See also

  • elogv — a curses-based tool that parses the contents of elogs created by Portage.
  • egencache — a tool that rebuilds metadata information for the Portage tree
  • Environment variables (AMD64 handbook)