From d5cbfc067ed9a1ff30c4b40f4b9c7ab4ce16c173 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 11 Aug 2008 06:52:45 +0000 Subject: In source_all_bashrcs(), only change $IFS while splitting $PROFILE_PATHS into an array, and then restore it before doing anything else. This avoids interference that can otherwise occur if code from profile.bashrc (or /etc/portage/env, be extension) needs to call any of the elog functions which use the save_IFS and restore_IFS aliases internally. svn path=/main/trunk/; revision=11397 --- bin/ebuild.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 68536ee82..7110c4257 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -1513,13 +1513,12 @@ source_all_bashrcs() { # source the existing profile.bashrc's. save_IFS IFS=$'\n' - for x in ${PROFILE_PATHS}; do - # Must unset it so that it doesn't mess up assumptions in the RCs. - unset IFS + local path_array=($PROFILE_PATHS) + restore_IFS + for x in ${path_array[@]} ; do [ -f "${x}/profile.bashrc" ] && qa_source "${x}/profile.bashrc" done - restore_IFS - + # We assume if people are changing shopts in their bashrc they do so at their # own peril. This is the ONLY non-portage bit of code that can change shopts # without a QA violation. -- cgit v1.2.3-1-g7c22