From 155295410d147b88886f7eb65f40dd9668747a92 Mon Sep 17 00:00:00 2001 From: Paul Varner Date: Tue, 5 Nov 2013 11:21:41 -0600 Subject: 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. --- bin/euse | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'bin') diff --git a/bin/euse b/bin/euse index 96d1f9b..7d5c83a 100755 --- a/bin/euse +++ b/bin/euse @@ -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 -- cgit v1.2.3-65-gdbad