Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH 12/13] python-r1.eclass: Mark eclass-generated variables read-only
Date: Sun, 06 Dec 2015 19:09:29
Message-Id: 1449428612-20538-13-git-send-email-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCHES] python-r1 suite clean up & impl reorder by "Michał Górny"
1 ---
2 eclass/python-r1.eclass | 5 +++--
3 1 file changed, 3 insertions(+), 2 deletions(-)
4
5 diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass
6 index 8c58e31..4b9c6f3 100644
7 --- a/eclass/python-r1.eclass
8 +++ b/eclass/python-r1.eclass
9 @@ -216,8 +216,8 @@ _python_set_globals() {
10 optflags+=,${flags_st[@]/%/(-)}
11
12 IUSE=${flags[*]}
13 - PYTHON_REQUIRED_USE="|| ( ${flags[*]} )"
14 - PYTHON_USEDEP=${optflags// /,}
15 + declare -g -r PYTHON_REQUIRED_USE="|| ( ${flags[*]} )"
16 + declare -g -r PYTHON_USEDEP=${optflags// /,}
17
18 # 1) well, python-exec would suffice as an RDEP
19 # but no point in making this overcomplex, BDEP doesn't hurt anyone
20 @@ -232,6 +232,7 @@ _python_set_globals() {
21 else
22 PYTHON_DEPS+="dev-lang/python-exec:2[${PYTHON_USEDEP}]"
23 fi
24 + readonly PYTHON_DEPS
25 }
26 _python_set_globals
27 unset -f _python_set_globals
28 --
29 2.6.3