summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/ebuild.sh3
-rw-r--r--pym/portage.py3
2 files changed, 4 insertions, 2 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 128a7d6cc..2f015d3a6 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -15,7 +15,8 @@ export SANDBOX_READ="${SANDBOX_READ}:/dev/shm:/dev/stdin:${PORTAGE_TMPDIR}"
# environment by modifying our PATH.
unset BASH_ENV
-# sandbox unsets ROOTPATH, so we have to back it up and restore it.
+# sandbox's bashrc sources /etc/profile which unsets ROOTPATH,
+# so we have to back it up and restore it.
if [ -n "${PORTAGE_ROOTPATH}" ] ; then
export ROOTPATH=${PORTAGE_ROOTPATH}
unset PORTAGE_ROOTPATH
diff --git a/pym/portage.py b/pym/portage.py
index db3a415ad..ee39a537d 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -2565,7 +2565,8 @@ class config:
if v is not None:
mydict[k] = v
- # sandbox unsets ROOTPATH, so we have to back it up and restore it.
+ # sandbox's bashrc sources /etc/profile which unsets ROOTPATH,
+ # so we have to back it up and restore it.
rootpath = mydict.get("ROOTPATH")
if rootpath:
mydict["PORTAGE_ROOTPATH"] = rootpath