# portageq portdir WARNING: 'portageq portdir' is deprecated. Use 'portageq repositories_configuration' instead. /var/package-manager/portage But 'portageq repositories_configuration /' is just like 'cat /etc/portage/repos.conf/*', it is not replacement for 'portageq portdir'. Adding 'get_main-repo' command would help: portageq get_repo_path / $(portageq get_main-repo)
i don't think adding a specific command here is the right way to go. since repos.conf is a collection of ini files, a command that lets you probe fields out of that would be more useful. something like: portageq repositories_configuration <eroot> [section] [key] then you could do: $ portageq repositories_configuration / gentoo location /usr/portage and we can treat the DEFAULT section specially: if the requested key doesn't exist in the DEFAULT section, then look it up in the specified main-repo. # This returns DEFAULT.main-repo. $ portageq repositories_configuration / DEFAULT main-repo gentoo # Since DEFAULT.location doesn't exist, it looks up DEFAULT.main-repo, gets # back e.g. gentoo, then looks up gentoo.location. $ portageq repositories_configuration / DEFAULT location /usr/portage now you have an exact replacement for `portageq envvar PORTDIR`. this doesn't provide a replacement for `portageq envvar PORTDIR_OVERLAYS` though. maybe we can accept options like: portageq repositories_configuration <eroot> [--list] [section] [key] which would let you do: # This would set sections to e.g. gentoo (filters out DEFAULT). sections=$(portageq repositories_configuration / --list) overlays=$(for s in ${sections}; do portageq repositories_configuration / ${s} location; done) by default we should return the sections in order of their priority