commit: 1ebf7392b8c06a505f148de8cbe4ad303ed71275
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 5 09:46:10 2021 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Fri Nov 5 09:46:10 2021 +0000
URL: https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=1ebf7392
bashrc: setup T & HOME variables
Current versions of portage don't write these variables to the env
file, so manually set them up ourselves.
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
data/sandbox.bashrc | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/data/sandbox.bashrc b/data/sandbox.bashrc
index ec19459..3b953b8 100644
--- a/data/sandbox.bashrc
+++ b/data/sandbox.bashrc
@@ -79,7 +79,11 @@ if [[ ${SANDBOX_INTRACTV} == "1" && -t 1 ]] || [[
${__SANDBOX_TESTING} == "yes"
-e '/^[[:alnum:]_-]* ()/Q'
"${sbs_tmpenvfile}") 2>/dev/null
# Then grab everything (including
functions)
source "${sbs_tmpenvfile}" 2> /dev/null
- export
SANDBOX_WRITE=${SANDBOX_WRITE}:${sbs_pdir}${sbs_bdir}:${sbs_pdir}/homedir
+ # Some variables portage does not write
out to th environment.
+ : "${T:=${sbs_tmpenvfile%/*}}"
+ HOME=${sbs_pdir}/homedir
+
SANDBOX_WRITE+=:${sbs_pdir}${sbs_bdir}:${HOME}
+ export T HOME SANDBOX_WRITE
fi
PWD=${sbs_PREPWD}
fi