diff options
| author | Paul Varner <fuzzyray@gentoo.org> | 2013-09-10 18:00:47 -0500 |
|---|---|---|
| committer | Paul Varner <fuzzyray@gentoo.org> | 2013-09-10 18:00:47 -0500 |
| commit | eb1931d628dcd4517965238a5558f8bbc0859960 (patch) | |
| tree | a601c50c0432e4295f3918cbfb86de69c2ce4982 /bin/euse | |
| parent | 87a01450ab33220f6f0821d4f4209004cdc3aa8b (diff) | |
| download | gentoolkit-eb1931d628dcd4517965238a5558f8bbc0859960.tar.gz | |
Add fallback to using portageq for get_portdir function.
Newer versions of portage no longer define PORTDIR in make.defaults or
make.conf. This change uses portageq to get the value of PORTDIR if
it is not found in make.defaults or make.conf.
Diffstat (limited to 'bin/euse')
| -rwxr-xr-x | bin/euse | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -712,6 +712,10 @@ get_flagstatus_pkg() { # # Outputs: # Location of portage tree root +# +# OBSOLETE: newer versions of portage do not define PORTDIR +# in make.defaults or make.conf anymore. Add fallback to +#portageq to handle that situation. get_portdir() { # Use a subshell so we don't have to protect the variables in # the current scope @@ -725,6 +729,10 @@ get_portdir() { source "${x}" done fi + + if [ -z "${PORTDIR:-}" ]; then + eval $(portageq envvar -v PORTDIR) + fi echo "${PORTDIR}" ) } # }}} |
