summaryrefslogtreecommitdiffstats
path: root/bin/ebuild.sh
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-12-02 22:18:41 +0000
committerZac Medico <zmedico@gentoo.org>2008-12-02 22:18:41 +0000
commit1d7798a2fb86b5c5d4e2ad6a3d8bf0810f60fff4 (patch)
treee93ba5f2c646575d54813dcb49671690f528f15a /bin/ebuild.sh
parent6bd289aa240aeb7f77389814ba5ad7e13fc09432 (diff)
downloadportage-1d7798a2fb86b5c5d4e2ad6a3d8bf0810f60fff4.tar.gz
portage-1d7798a2fb86b5c5d4e2ad6a3d8bf0810f60fff4.tar.bz2
portage-1d7798a2fb86b5c5d4e2ad6a3d8bf0810f60fff4.zip
Source bashrc files as late as possible, giving them the opportunity to
override as much as possible. Thanks to Ned Ludd <solar@g.o> for the suggestion. svn path=/main/trunk/; revision=12134
Diffstat (limited to 'bin/ebuild.sh')
-rwxr-xr-xbin/ebuild.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 87f94717b..197be2696 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -1492,6 +1492,8 @@ _ebuild_phase_funcs() {
esac
}
+PORTAGE_BASHRCS_SOURCED=0
+
# @FUNCTION: source_all_bashrcs
# @DESCRIPTION:
# Source a relevant bashrc files and perform other miscellaneous
@@ -1504,6 +1506,8 @@ _ebuild_phase_funcs() {
# function for the current phase.
#
source_all_bashrcs() {
+ [[ $PORTAGE_BASHRCS_SOURCED = 1 ]] && return 0
+ PORTAGE_BASHRCS_SOURCED=1
local x
if [[ -n $EBUILD_PHASE && -n $EAPI ]] ; then
@@ -1840,7 +1844,6 @@ if ! hasq "$EBUILD_PHASE" clean cleanrm depend && \
;;
esac
- source_all_bashrcs
fi
if ! hasq "$EBUILD_PHASE" clean cleanrm && \
@@ -1888,9 +1891,6 @@ fi
# code can simply assume that it's defined.
[[ -n $EAPI ]] || EAPI=0
-# enable bashrc support for the clean phase
-hasq "$EBUILD_PHASE" clean cleanrm && source_all_bashrcs
-
# unset USE_EXPAND variables that contain only the special "*" token
for x in ${USE_EXPAND} ; do
[ "${!x}" == "*" ] && unset ${x}
@@ -1918,6 +1918,7 @@ if [ "${EBUILD_PHASE}" != "depend" ] ; then
fi
ebuild_main() {
+ source_all_bashrcs
local f x
local export_vars="ASFLAGS CCACHE_DIR CCACHE_SIZE
CFLAGS CXXFLAGS LDFLAGS LIBCFLAGS LIBCXXFLAGS"