1 |
Author: zmedico |
2 |
Date: 2009-04-30 07:04:31 +0000 (Thu, 30 Apr 2009) |
3 |
New Revision: 13487 |
4 |
|
5 |
Modified: |
6 |
main/branches/2.1.6/bin/ebuild.sh |
7 |
Log: |
8 |
Avoid leaking some variables from ebuild_main() into the environment (local |
9 |
variables are exposed to 'children'). (trunk r13316) |
10 |
|
11 |
Modified: main/branches/2.1.6/bin/ebuild.sh |
12 |
=================================================================== |
13 |
--- main/branches/2.1.6/bin/ebuild.sh 2009-04-30 07:04:19 UTC (rev 13486) |
14 |
+++ main/branches/2.1.6/bin/ebuild.sh 2009-04-30 07:04:31 UTC (rev 13487) |
15 |
@@ -1901,8 +1901,6 @@ |
16 |
|
17 |
ebuild_main() { |
18 |
local f x |
19 |
- local export_vars="ASFLAGS CCACHE_DIR CCACHE_SIZE |
20 |
- CFLAGS CXXFLAGS LDFLAGS LIBCFLAGS LIBCXXFLAGS" |
21 |
|
22 |
if ! hasq $EBUILD_SH_ARGS clean depend help info nofetch ; then |
23 |
|
24 |
@@ -1931,6 +1929,7 @@ |
25 |
if [[ $EBUILD_PHASE != depend ]] ; then |
26 |
local phase_func=$(_ebuild_arg_to_phase "$EAPI" "$EBUILD_PHASE") |
27 |
[[ -n $phase_func ]] && _ebuild_phase_funcs "$EAPI" "$phase_func" |
28 |
+ unset phase_func |
29 |
fi |
30 |
|
31 |
source_all_bashrcs |
32 |
@@ -1971,7 +1970,8 @@ |
33 |
case "$EBUILD_SH_ARGS" in |
34 |
configure|compile) |
35 |
|
36 |
- for x in $export_vars ; do |
37 |
+ for x in ASFLAGS CCACHE_DIR CCACHE_SIZE \ |
38 |
+ CFLAGS CXXFLAGS LDFLAGS LIBCFLAGS LIBCXXFLAGS ; do |
39 |
[[ ${!x-unset} != unset ]] && export $x |
40 |
done |