From: "Kent Fredric" <kentfredric@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/perl-overlay:master commit in: eclass/
Date: Sun, 15 Mar 2015 05:10:26 +0000 (UTC) [thread overview]
Message-ID: <1426390337.4abc0cf75db47cf0389e3bd126487168e5ded370.kent@gentoo> (raw)
commit: 4abc0cf75db47cf0389e3bd126487168e5ded370
Author: Kent Fredric <kentfredric <AT> gmail <DOT> com>
AuthorDate: Sun Mar 15 03:28:14 2015 +0000
Commit: Kent Fredric <kentfredric <AT> gmail <DOT> com>
CommitDate: Sun Mar 15 03:32:17 2015 +0000
URL: https://gitweb.gentoo.org/proj/perl-overlay.git/commit/?id=4abc0cf7
[perl-module.eclass] Add perl_check_env patch re bug 543042
eclass/perl-module.eclass | 45 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass
index 593a030..dcf8620 100644
--- a/eclass/perl-module.eclass
+++ b/eclass/perl-module.eclass
@@ -131,6 +131,8 @@ perl-module_src_configure() {
[[ ${SRC_PREP} = yes ]] && return 0
SRC_PREP="yes"
+ perl_check_env
+
perl_set_version
perl_set_eprefix
@@ -726,3 +728,46 @@ perl_set_eprefix() {
;;
esac
}
+
+# @FUNCTION: perl_check_env
+# @USAGE: perl_check_env
+# @DESCRIPTION:
+# Checks a blacklist of known-suspect ENV values that can be accidentally set by users
+# doing personal perl work, which may accidentally leak into portage and break the
+# system perl installaton.
+# Dies if any of the suspect fields are found, and tells users the circumvention options
+# for the problem, whether it be unsetting the bad fields, or setting
+# I_KNOW_WHAT_IM_DOING=1
+
+perl_check_env() {
+ local errored value;
+
+ for i in PERL_MM_OPT PERL5LIB PERL5OPT PERL_MB_OPT PERL_CORE PERLPREFIX; do
+ # Next unless match
+ [ -v $i ] || continue;
+
+ # Warn only once, and warn only when one of the bad values are set.
+ # record failure here.
+ [ ${errored:-0} == 0 ] && \
+ ewarn "perl-module.eclass: Suspect ENV values found.";
+
+ errored=1
+
+ # Read ENV Value
+ eval "value=\$$i";
+
+ # Print ENV name/value pair
+ ewarn " $i=\"$value\"";
+ done
+
+ # Return if there were no failures
+ [ ${errored:-0} == 0 ] && return;
+
+ # Return if user knows what they're doing
+ if [ ${I_KNOW_WHAT_IM_DOING:-0} == 1 ]; then
+ ewarn "Continuing due to I_KNOW_WHAT_IM_DOING=1"
+ return
+ fi
+
+ die "Please unset from ENV ( ~/.bashrc, package.env, etc ) or set I_KNOW_WHAT_IM_DOING=1"
+}
next reply other threads:[~2015-03-15 5:10 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-15 5:10 Kent Fredric [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-09-17 0:51 [gentoo-commits] proj/perl-overlay:master commit in: eclass/ Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2017-09-17 0:51 Kent Fredric
2015-06-25 1:26 Kent Fredric
2015-06-21 0:39 Kent Fredric
2015-06-21 0:39 Kent Fredric
2015-06-20 22:13 Kent Fredric
2015-06-20 22:13 Kent Fredric
2015-06-20 22:13 Kent Fredric
2015-06-20 22:13 Kent Fredric
2015-03-26 12:14 Kent Fredric
2015-03-15 17:06 Kent Fredric
2015-03-15 5:10 Kent Fredric
2014-12-23 18:19 Kent Fredric
2014-12-23 18:19 Kent Fredric
2014-12-23 14:43 Kent Fredric
2014-10-11 18:46 Kent Fredric
2014-10-11 18:46 Kent Fredric
2014-10-11 18:46 Kent Fredric
2014-08-26 19:06 Kent Fredric
2014-08-24 13:56 Kent Fredric
2014-08-20 13:24 Kent Fredric
2014-04-04 23:09 Kent Fredric
2013-09-17 4:35 Kent Fredric
2013-09-17 4:28 Kent Fredric
2013-04-28 16:53 Kent Fredric
2012-09-15 16:58 Torsten Veller
2012-06-07 6:06 Torsten Veller
2012-06-05 18:22 Torsten Veller
2012-06-05 18:22 Torsten Veller
2012-04-23 13:04 Torsten Veller
2012-04-23 13:04 Torsten Veller
2012-04-23 13:04 Torsten Veller
2011-08-16 17:02 Torsten Veller
2011-04-24 8:37 Torsten Veller
2011-02-04 8:15 tove
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1426390337.4abc0cf75db47cf0389e3bd126487168e5ded370.kent@gentoo \
--to=kentfredric@gmail.com \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox