summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-11-23 10:12:06 +0000
committerZac Medico <zmedico@gentoo.org>2007-11-23 10:12:06 +0000
commit02303b48934b4972be6d4fbf915f80100ef9dad0 (patch)
tree268df12b87eb725ae11513ede86d18772853faa7 /bin
parent94445fa8c3c32ef86b9a968c3267b02ef6764b7c (diff)
downloadportage-02303b48934b4972be6d4fbf915f80100ef9dad0.tar.gz
portage-02303b48934b4972be6d4fbf915f80100ef9dad0.tar.bz2
portage-02303b48934b4972be6d4fbf915f80100ef9dad0.zip
For compatibility with previous behavior, so the bashrc sourcing
after the ebuild environment is fully loaded. svn path=/main/trunk/; revision=8617
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ebuild.sh64
1 files changed, 31 insertions, 33 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 8124a1511..132da2c11 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -60,9 +60,6 @@ export PATH="/usr/local/sbin:/sbin:/usr/sbin:${PORTAGE_BIN_PATH}:/usr/local/bin:
source "${PORTAGE_BIN_PATH}/isolated-functions.sh" &>/dev/null
-OCC="$CC"
-OCXX="$CXX"
-
# Set IMAGE for minimal backward compatibility with
# overlays or user's bashrc, but don't export it.
[ "${EBUILD_PHASE}" == "preinst" ] && IMAGE=${D}
@@ -101,36 +98,6 @@ lchgrp() {
chgrp -h "$@"
}
-# source the existing profile.bashrc's.
-save_IFS
-IFS=$'\n'
-for dir in ${PROFILE_PATHS}; do
- # Must unset it so that it doesn't mess up assumptions in the RCs.
- unset IFS
- if [ -f "${dir}/profile.bashrc" ]; then
- qa_source "${dir}/profile.bashrc"
- fi
-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.
-if [ -f "${PORTAGE_BASHRC}" ]; then
- # If $- contains x, then tracing has already enabled elsewhere for some
- # reason. We preserve it's state so as not to interfere.
- if [ "$PORTAGE_DEBUG" != "1" ] || [ "${-/x/}" != "$-" ]; then
- source "${PORTAGE_BASHRC}"
- else
- set -x
- source "${PORTAGE_BASHRC}"
- set +x
- fi
-fi
-
-[ ! -z "$OCC" ] && export CC="$OCC"
-[ ! -z "$OCXX" ] && export CXX="$OCXX"
-
esyslog() {
# Custom version of esyslog() to take care of the "Red Star" bug.
# MUST follow functions.sh to override the "" parameter problem.
@@ -1691,6 +1658,37 @@ if [ "${EBUILD_PHASE}" != "depend" ] ; then
unset x
fi
+OCC="${CC}"
+OCXX="${CXX}"
+
+# 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
+ [ -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.
+if [ -f "${PORTAGE_BASHRC}" ]; then
+ # If $- contains x, then tracing has already enabled elsewhere for some
+ # reason. We preserve it's state so as not to interfere.
+ if [ "$PORTAGE_DEBUG" != "1" ] || [ "${-/x/}" != "$-" ]; then
+ source "${PORTAGE_BASHRC}"
+ else
+ set -x
+ source "${PORTAGE_BASHRC}"
+ set +x
+ fi
+fi
+
+[ ! -z "$OCC" ] && export CC="$OCC"
+[ ! -z "$OCXX" ] && export CXX="$OCXX"
+
if [ -n "${EBUILD_SH_ARGS}" ] ; then
case ${EBUILD_SH_ARGS} in
nofetch)