Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r12134 - main/trunk/bin
Date: Tue, 02 Dec 2008 22:18:44
Message-Id: E1L7dZq-0004PY-6k@stork.gentoo.org
1 Author: zmedico
2 Date: 2008-12-02 22:18:41 +0000 (Tue, 02 Dec 2008)
3 New Revision: 12134
4
5 Modified:
6 main/trunk/bin/ebuild.sh
7 main/trunk/bin/isolated-functions.sh
8 main/trunk/bin/misc-functions.sh
9 Log:
10 Source bashrc files as late as possible, giving them the opportunity to
11 override as much as possible. Thanks to Ned Ludd <solar@g.o> for the
12 suggestion.
13
14
15 Modified: main/trunk/bin/ebuild.sh
16 ===================================================================
17 --- main/trunk/bin/ebuild.sh 2008-12-01 21:14:48 UTC (rev 12133)
18 +++ main/trunk/bin/ebuild.sh 2008-12-02 22:18:41 UTC (rev 12134)
19 @@ -1492,6 +1492,8 @@
20 esac
21 }
22
23 +PORTAGE_BASHRCS_SOURCED=0
24 +
25 # @FUNCTION: source_all_bashrcs
26 # @DESCRIPTION:
27 # Source a relevant bashrc files and perform other miscellaneous
28 @@ -1504,6 +1506,8 @@
29 # function for the current phase.
30 #
31 source_all_bashrcs() {
32 + [[ $PORTAGE_BASHRCS_SOURCED = 1 ]] && return 0
33 + PORTAGE_BASHRCS_SOURCED=1
34 local x
35
36 if [[ -n $EBUILD_PHASE && -n $EAPI ]] ; then
37 @@ -1840,7 +1844,6 @@
38 ;;
39 esac
40
41 - source_all_bashrcs
42 fi
43
44 if ! hasq "$EBUILD_PHASE" clean cleanrm && \
45 @@ -1888,9 +1891,6 @@
46 # code can simply assume that it's defined.
47 [[ -n $EAPI ]] || EAPI=0
48
49 -# enable bashrc support for the clean phase
50 -hasq "$EBUILD_PHASE" clean cleanrm && source_all_bashrcs
51 -
52 # unset USE_EXPAND variables that contain only the special "*" token
53 for x in ${USE_EXPAND} ; do
54 [ "${!x}" == "*" ] && unset ${x}
55 @@ -1918,6 +1918,7 @@
56 fi
57
58 ebuild_main() {
59 + source_all_bashrcs
60 local f x
61 local export_vars="ASFLAGS CCACHE_DIR CCACHE_SIZE
62 CFLAGS CXXFLAGS LDFLAGS LIBCFLAGS LIBCXXFLAGS"
63
64 Modified: main/trunk/bin/isolated-functions.sh
65 ===================================================================
66 --- main/trunk/bin/isolated-functions.sh 2008-12-01 21:14:48 UTC (rev 12133)
67 +++ main/trunk/bin/isolated-functions.sh 2008-12-02 22:18:41 UTC (rev 12134)
68 @@ -514,7 +514,8 @@
69 GOOD HILITE HOME IMAGE \
70 LAST_E_CMD LAST_E_LEN LD_PRELOAD MISC_FUNCTIONS_ARGS MOPREFIX \
71 NORMAL PKGDIR PKGUSE PKG_LOGDIR PKG_TMPDIR \
72 - PORTAGE_ACTUAL_DISTDIR PORTAGE_ARCHLIST PORTAGE_BASHRC \
73 + PORTAGE_ACTUAL_DISTDIR PORTAGE_ARCHLIST \
74 + PORTAGE_BASHRC PORTAGE_BASHRCS_SOURCED \
75 PORTAGE_BINPKG_TAR_OPTS PORTAGE_BINPKG_TMPFILE PORTAGE_BUILDDIR \
76 PORTAGE_COLORMAP PORTAGE_CONFIGROOT PORTAGE_DEBUG \
77 PORTAGE_DEPCACHEDIR PORTAGE_GID PORTAGE_INST_GID \
78
79 Modified: main/trunk/bin/misc-functions.sh
80 ===================================================================
81 --- main/trunk/bin/misc-functions.sh 2008-12-01 21:14:48 UTC (rev 12133)
82 +++ main/trunk/bin/misc-functions.sh 2008-12-02 22:18:41 UTC (rev 12134)
83 @@ -710,6 +710,7 @@
84 }
85
86 if [ -n "${MISC_FUNCTIONS_ARGS}" ]; then
87 + source_all_bashrcs
88 [ "$PORTAGE_DEBUG" == "1" ] && set -x
89 for x in ${MISC_FUNCTIONS_ARGS}; do
90 ${x}