Lines 131-136
perl-module_src_configure() {
Link Here
|
131 |
[[ ${SRC_PREP} = yes ]] && return 0 |
131 |
[[ ${SRC_PREP} = yes ]] && return 0 |
132 |
SRC_PREP="yes" |
132 |
SRC_PREP="yes" |
133 |
|
133 |
|
|
|
134 |
perl_check_env |
135 |
|
134 |
perl_set_version |
136 |
perl_set_version |
135 |
perl_set_eprefix |
137 |
perl_set_eprefix |
136 |
|
138 |
|
Lines 726-728
perl_set_eprefix() {
Link Here
|
726 |
;; |
728 |
;; |
727 |
esac |
729 |
esac |
728 |
} |
730 |
} |
729 |
- |
731 |
|
|
|
732 |
# @FUNCTION: perl_check_env |
733 |
# @USAGE: perl_check_env |
734 |
# @DESCRIPTION: |
735 |
# Checks a blacklist of known-suspect ENV values that can be accidentally set by users |
736 |
# doing personal perl work, which may accidentally leak into portage and break the |
737 |
# system perl installaton. |
738 |
# Dies if any of the suspect fields are found, and tells users the circumvention options |
739 |
# for the problem, whether it be unsetting the bad fields, or setting |
740 |
# I_KNOW_WHAT_IM_DOING=1 |
741 |
|
742 |
perl_check_env() { |
743 |
local errored value; |
744 |
|
745 |
for i in PERL_MM_OPT PERL5LIB PERL5OPT PERL_MB_OPT PERL_CORE PERLPREFIX; do |
746 |
# Next unless match |
747 |
[ -v $i ] || continue; |
748 |
|
749 |
# Warn only once, and warn only when one of the bad values are set. |
750 |
# record failure here. |
751 |
[ ${errored:-0} == 0 ] && \ |
752 |
ewarn "perl-module.eclass: Suspect ENV values found."; |
753 |
|
754 |
errored=1 |
755 |
|
756 |
# Read ENV Value |
757 |
eval "value=\$$i"; |
758 |
|
759 |
# Print ENV name/value pair |
760 |
ewarn " $i=\"$value\""; |
761 |
done |
762 |
|
763 |
# Return if there were no failures |
764 |
[ ${errored:-0} == 0 ] && return; |
765 |
|
766 |
# Return if user knows what they're doing |
767 |
if [ ${I_KNOW_WHAT_IM_DOING:-0} == 1 ]; then |
768 |
ewarn "Continuing due to I_KNOW_WHAT_IM_DOING=1" |
769 |
return |
770 |
fi |
771 |
|
772 |
die "Please unset from ENV ( ~/.bashrc, package.env, etc ) or set I_KNOW_WHAT_IM_DOING=1" |
773 |
} |