Lines 114-119
Link Here
|
114 |
[[ ${SRC_PREP} = yes ]] && return 0 |
114 |
[[ ${SRC_PREP} = yes ]] && return 0 |
115 |
SRC_PREP="yes" |
115 |
SRC_PREP="yes" |
116 |
|
116 |
|
|
|
117 |
perl_check_env |
118 |
|
117 |
perl_set_version |
119 |
perl_set_version |
118 |
|
120 |
|
119 |
[[ -z ${pm_echovar} ]] && export PERL_MM_USE_DEFAULT=1 |
121 |
[[ -z ${pm_echovar} ]] && export PERL_MM_USE_DEFAULT=1 |
Lines 548-550
Link Here
|
548 |
popd > /dev/null |
550 |
popd > /dev/null |
549 |
fi |
551 |
fi |
550 |
} |
552 |
} |
|
|
553 |
|
554 |
# @FUNCTION: perl_check_env |
555 |
# @USAGE: perl_check_env |
556 |
# @DESCRIPTION: |
557 |
# Checks a blacklist of known-suspect ENV values that can be accidentally set by users |
558 |
# doing personal perl work, which may accidentally leak into portage and break the |
559 |
# system perl installaton. |
560 |
# Dies if any of the suspect fields are found, and tells users the circumvention options |
561 |
# for the problem, whether it be unsetting the bad fields, or setting |
562 |
# I_KNOW_WHAT_IM_DOING=1 |
563 |
perl_check_env() { |
564 |
local warned value; |
565 |
|
566 |
for i in PERL_MM_OPT PERL5LIB PERL5OPT PERL_MB_OPT PERL_CORE PERLPREFIX; do |
567 |
# Next Loop unless match |
568 |
[ -v $i ] || continue; |
569 |
|
570 |
# Warn only once, and warn only when one of the bad values are set. |
571 |
# record failure here. |
572 |
if [ ${warned:-0} == 0 ]; then |
573 |
if [ ${I_KNOW_WHAT_IM_DOING:-0} == 1 ]; then |
574 |
ewarn "Potentially bad ENV values found but I_KNOW_WHAT_IM_DOING=1"; |
575 |
else |
576 |
ewarn "Bad ENV values found. Please unset from ENV ( ~/.bashrc, package.env, etc ) or set I_KNOW_WHAT_IM_DOING=1" |
577 |
fi |
578 |
warned=1 |
579 |
fi |
580 |
|
581 |
# Read ENV Value |
582 |
eval "value=\$$i"; |
583 |
|
584 |
# Print ENV name/value pair |
585 |
ewarn " $i=\"$value\""; |
586 |
done |
587 |
|
588 |
# If any failures occurred, die unless I_KNOW_WHAT_IM_DOING |
589 |
if [ ${warned:-0} == 1 ] && [ ${I_KNOW_WHAT_IM_DOING:-0} != 1 ]; then |
590 |
die; |
591 |
fi |
592 |
} |
593 |
|