Skip sourcinf of profile.bashrc during the depend phase.
authorZac Medico <zmedico@gentoo.org>
Tue, 2 Dec 2008 22:33:44 +0000 (22:33 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 2 Dec 2008 22:33:44 +0000 (22:33 -0000)
svn path=/main/trunk/; revision=12136

bin/ebuild.sh

index 197be269636b4d70b7e914157c4154d7fcec9a7b..0a16e8a7a4118a1b9d85886f9afb6f77df2e43e1 100755 (executable)
@@ -1516,14 +1516,17 @@ source_all_bashrcs() {
        fi
 
        local OCC="${CC}" OCXX="${CXX}"
-       # source the existing profile.bashrc's.
-       save_IFS
-       IFS=$'\n'
-       local path_array=($PROFILE_PATHS)
-       restore_IFS
-       for x in "${path_array[@]}" ; do
-               [ -f "${x}/profile.bashrc" ] && qa_source "${x}/profile.bashrc"
-       done
+
+       if [[ $EBUILD_PHASE != depend ]] ; then
+               # source the existing profile.bashrcs.
+               save_IFS
+               IFS=$'\n'
+               local path_array=($PROFILE_PATHS)
+               restore_IFS
+               for x in "${path_array[@]}" ; do
+                       [ -f "$x/profile.bashrc" ] && qa_source "$x/profile.bashrc"
+               done
+       fi
 
        # 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