summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorPaul Varner <fuzzyray@gentoo.org>2013-11-05 11:21:41 -0600
committerPaul Varner <fuzzyray@gentoo.org>2013-11-05 11:21:41 -0600
commit155295410d147b88886f7eb65f40dd9668747a92 (patch)
tree1272fb2ee064523cfd6c741dadc38d5091575a4a /bin
parentAdd contributing section to README.dev (diff)
downloadgentoolkit-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-xbin/euse18
1 files changed, 3 insertions, 15 deletions
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