summaryrefslogtreecommitdiffstats
path: root/bin/ebuild.sh
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-03-10 07:22:46 -0800
committerZac Medico <zmedico@gentoo.org>2012-03-10 09:44:44 -0800
commit20403c15331c63f5bbdc6dabbd8c9b3ad291aaca (patch)
treea6defcbbb74fd43f66d95599a9743da985ea076b /bin/ebuild.sh
parentc0177a6e01e0919164f373c3cc130a265e8cf27c (diff)
downloadportage-20403c15331c63f5bbdc6dabbd8c9b3ad291aaca.tar.gz
portage-20403c15331c63f5bbdc6dabbd8c9b3ad291aaca.tar.bz2
portage-20403c15331c63f5bbdc6dabbd8c9b3ad291aaca.zip
ebuild.sh: skip EBUILD_HOOK_DIR for depend phase
Diffstat (limited to 'bin/ebuild.sh')
-rwxr-xr-xbin/ebuild.sh40
1 files changed, 25 insertions, 15 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 74c4f6941..b1d1df158 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -375,24 +375,34 @@ source_all_bashrcs() {
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
- # without a QA violation.
- for x in "${PORTAGE_BASHRC}" "${PM_EBUILD_HOOK_DIR}"/${CATEGORY}/{${PN},${PN}:${SLOT},${P},${PF}}; do
- if [ -r "${x}" ]; 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 "${x}"
- else
- set -x
- source "${x}"
- set +x
+ # The user's bashrc is the ONLY non-portage bit of code that can
+ # change shopts without a QA violation.
+ for x in "${PM_EBUILD_HOOK_DIR}"/${CATEGORY}/{${PN},${PN}:${SLOT},${P},${PF}}; do
+ if [ -r "${x}" ]; then
+ # If $- contains x, then tracing has already been enabled
+ # elsewhere for some reason. We preserve it's state so as
+ # not to interfere.
+ if [ "$PORTAGE_DEBUG" != "1" ] || [ "${-/x/}" != "$-" ]; then
+ source "${x}"
+ else
+ set -x
+ source "${x}"
+ set +x
+ fi
fi
+ done
+ fi
+
+ if [ -r "${PORTAGE_BASHRC}" ] ; then
+ if [ "$PORTAGE_DEBUG" != "1" ] || [ "${-/x/}" != "$-" ]; then
+ source "${PORTAGE_BASHRC}"
+ else
+ set -x
+ source "${PORTAGE_BASHRC}"
+ set +x
fi
- done
+ fi
[ ! -z "${OCC}" ] && export CC="${OCC}"
[ ! -z "${OCXX}" ] && export CXX="${OCXX}"