1 |
In Prefix, PATH should also be preserved, resulting in a mouthful of |
2 |
`env -i PATH=${PATH} ROOT=${ROOT}`. The origin commit introducing |
3 |
env -i was for "cleanup". Dropping env -i is cleaner. |
4 |
|
5 |
Reference: https://gitweb.gentoo.org/repo/gentoo/historical.git/commit/?id=a8a64d1886cc5c9f975353b97237f2900a3ee88c |
6 |
Reference: https://gitweb.gentoo.org/repo/gentoo/historical.git/commit/?id=7d9f89700a2ee50674c0d871ec6d21b468ac6206 |
7 |
--- |
8 |
eclass/toolchain.eclass | 8 ++++---- |
9 |
1 file changed, 4 insertions(+), 4 deletions(-) |
10 |
|
11 |
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass |
12 |
index ef932d2..8e04864 100644 |
13 |
--- a/eclass/toolchain.eclass |
14 |
+++ b/eclass/toolchain.eclass |
15 |
@@ -2119,13 +2119,13 @@ toolchain_pkg_postrm() { |
16 |
|
17 |
do_gcc_config() { |
18 |
if ! should_we_gcc_config ; then |
19 |
- env -i ROOT="${ROOT}" gcc-config --use-old --force |
20 |
+ gcc-config --use-old --force |
21 |
return 0 |
22 |
fi |
23 |
|
24 |
local current_gcc_config target |
25 |
|
26 |
- current_gcc_config=$(env -i ROOT="${ROOT}" gcc-config -c ${CTARGET} 2>/dev/null) |
27 |
+ current_gcc_config=$(gcc-config -c ${CTARGET} 2>/dev/null) |
28 |
if [[ -n ${current_gcc_config} ]] ; then |
29 |
local current_specs use_specs |
30 |
# figure out which specs-specific config is active |
31 |
@@ -2159,12 +2159,12 @@ should_we_gcc_config() { |
32 |
# if the current config is invalid, we definitely want a new one |
33 |
# Note: due to bash quirkiness, the following must not be 1 line |
34 |
local curr_config |
35 |
- curr_config=$(env -i ROOT="${ROOT}" gcc-config -c ${CTARGET} 2>&1) || return 0 |
36 |
+ curr_config=$(gcc-config -c ${CTARGET} 2>&1) || return 0 |
37 |
|
38 |
# if the previously selected config has the same major.minor (branch) as |
39 |
# the version we are installing, then it will probably be uninstalled |
40 |
# for being in the same SLOT, make sure we run gcc-config. |
41 |
- local curr_config_ver=$(env -i ROOT="${ROOT}" gcc-config -S ${curr_config} | awk '{print $2}') |
42 |
+ local curr_config_ver=$(gcc-config -S ${curr_config} | awk '{print $2}') |
43 |
|
44 |
local curr_branch_ver=$(get_version_component_range 1-2 ${curr_config_ver}) |
45 |
|
46 |
-- |
47 |
2.8.3 |