portageq
Query Gentoo Portage package database
TLDR
Display environment variable value
SYNOPSIS
portageq command [root] [arguments...]
DESCRIPTION
portageq queries Portage configuration and package database on Gentoo Linux. It provides programmatic access to Portage's internal data, useful for scripts and build automation.
The tool can retrieve environment variables, repository information, and detailed package metadata without parsing configuration files directly.
PARAMETERS
root
Root directory for queries (usually /)variable
Environment variable namecategory/package
Package atom for queries
COMMANDS
envvar
Display Portage environment variablerepos_config
Show detailed repository configurationget_repos
List repositories by prioritymetadata
Query package metadatabest_visible
Find best visible package versionmatch
Find packages matching atomhas_version
Check if package is installed
CAVEATS
Gentoo-specific tool. Some queries require package to be installed. Root parameter required for most commands. Output format varies by command.
HISTORY
portageq is part of Portage, Gentoo's package management system. It provides a stable query interface for scripts, avoiding direct parsing of Portage's complex configuration.
