diff options
author | James Le Cuirot <chewi@aura-online.co.uk> | 2012-04-28 17:33:07 +0100 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2012-04-28 13:17:37 -0700 |
commit | 7bf14ebd3feb75c368f32e06e1ac34e9ccbd35ed (patch) | |
tree | 7006bf1f407a95fec013e2698d4cca615bbef62a | |
parent | fb9453f7466b7843c2ef6805bbeb9375de93c8ef (diff) | |
download | portage-7bf14ebd3feb75c368f32e06e1ac34e9ccbd35ed.tar.gz portage-7bf14ebd3feb75c368f32e06e1ac34e9ccbd35ed.tar.bz2 portage-7bf14ebd3feb75c368f32e06e1ac34e9ccbd35ed.zip |
ebuild.sh: source /etc/portage/env scripts after /etc/portage/bashrc
This will fix bug #413895.
-rwxr-xr-x | bin/ebuild.sh | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh index b1d1df158..173865cde 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -375,7 +375,19 @@ source_all_bashrcs() { for x in "${path_array[@]}" ; do [ -f "$x/profile.bashrc" ] && qa_source "$x/profile.bashrc" 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 + fi + if [[ $EBUILD_PHASE != depend ]] ; then # 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 @@ -394,16 +406,6 @@ source_all_bashrcs() { 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 - fi - [ ! -z "${OCC}" ] && export CC="${OCC}" [ ! -z "${OCXX}" ] && export CXX="${OCXX}" } |