diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-08-11 06:52:45 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-08-11 06:52:45 +0000 |
commit | d5cbfc067ed9a1ff30c4b40f4b9c7ab4ce16c173 (patch) | |
tree | 21c4a8174b236d3611e4b29de8c6d3ddc67c219e | |
parent | 1b3d1936be5d644358d21a597ce8fc60aad7cd7c (diff) | |
download | portage-d5cbfc067ed9a1ff30c4b40f4b9c7ab4ce16c173.tar.gz portage-d5cbfc067ed9a1ff30c4b40f4b9c7ab4ce16c173.tar.bz2 portage-d5cbfc067ed9a1ff30c4b40f4b9c7ab4ce16c173.zip |
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
-rwxr-xr-x | bin/ebuild.sh | 9 |
1 files 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. |