summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/euse8
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/euse b/bin/euse
index 7efb03f..96d1f9b 100755
--- a/bin/euse
+++ b/bin/euse
@@ -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}"
)
} # }}}