diff options
author | Paul Varner <fuzzyray@gentoo.org> | 2013-11-05 11:21:41 -0600 |
---|---|---|
committer | Paul Varner <fuzzyray@gentoo.org> | 2013-11-05 11:21:41 -0600 |
commit | 155295410d147b88886f7eb65f40dd9668747a92 (patch) | |
tree | 1272fb2ee064523cfd6c741dadc38d5091575a4a /bin | |
parent | Add contributing section to README.dev (diff) | |
download | gentoolkit-155295410d147b88886f7eb65f40dd9668747a92.tar.gz gentoolkit-155295410d147b88886f7eb65f40dd9668747a92.tar.bz2 gentoolkit-155295410d147b88886f7eb65f40dd9668747a92.zip |
euse: use portageq for get_portdir function unconditionally.
Newer versions of portage don't define PORTDIR in make.conf or
make.defaults. Additionally, if it is defined, it can still be
overridden in repos.conf. Use portageq to ensure we have the correct
value.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/euse | 18 |
1 files changed, 3 insertions, 15 deletions
@@ -714,26 +714,14 @@ get_flagstatus_pkg() { # 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. +# in make.defaults or make.conf anymore and can be overridden +# in repos.conf. Use portageq to determine the correct value. get_portdir() { # Use a subshell so we don't have to protect the variables in # the current scope ( - if [ -z "${PORTDIR:-}" ]; then - source "${MAKE_GLOBALS_PATH}" - for x in $(get_all_make_defaults); do - source "${x}" - done - for x in $(get_all_make_conf); do - source "${x}" - done - fi - - if [ -z "${PORTDIR:-}" ]; then eval $(portageq envvar -v PORTDIR) - fi - echo "${PORTDIR}" + echo "${PORTDIR}" ) } # }}} # This won't change while the script is running, so cache it |