1 |
commit: 44d3345d828af162b2fbfd623dd8f0d7ac4ae2f9 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Dec 11 21:26:45 2015 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Dec 11 21:27:19 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=44d3345d |
7 |
|
8 |
python*-r1.eclass: Replace non-portable use of 'declare -g' |
9 |
|
10 |
Replace uses of 'declare -g -r' (bash-4.2+) with 'readonly'. Reported |
11 |
by Arfrever. |
12 |
|
13 |
eclass/python-any-r1.eclass | 2 +- |
14 |
eclass/python-r1.eclass | 4 ++-- |
15 |
eclass/python-single-r1.eclass | 2 +- |
16 |
eclass/python-utils-r1.eclass | 2 +- |
17 |
4 files changed, 5 insertions(+), 5 deletions(-) |
18 |
|
19 |
diff --git a/eclass/python-any-r1.eclass b/eclass/python-any-r1.eclass |
20 |
index 82ead76..846c0da 100644 |
21 |
--- a/eclass/python-any-r1.eclass |
22 |
+++ b/eclass/python-any-r1.eclass |
23 |
@@ -133,7 +133,7 @@ _python_any_set_globals() { |
24 |
|
25 |
PYTHON_DEPS="${PYTHON_PKG_DEP} ${PYTHON_DEPS}" |
26 |
done |
27 |
- declare -g -r PYTHON_DEPS="|| ( ${PYTHON_DEPS})" |
28 |
+ readonly PYTHON_DEPS="|| ( ${PYTHON_DEPS})" |
29 |
} |
30 |
_python_any_set_globals |
31 |
unset -f _python_any_set_globals |
32 |
|
33 |
diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass |
34 |
index 4b9c6f3..5c1f1b3 100644 |
35 |
--- a/eclass/python-r1.eclass |
36 |
+++ b/eclass/python-r1.eclass |
37 |
@@ -216,8 +216,8 @@ _python_set_globals() { |
38 |
optflags+=,${flags_st[@]/%/(-)} |
39 |
|
40 |
IUSE=${flags[*]} |
41 |
- declare -g -r PYTHON_REQUIRED_USE="|| ( ${flags[*]} )" |
42 |
- declare -g -r PYTHON_USEDEP=${optflags// /,} |
43 |
+ readonly PYTHON_REQUIRED_USE="|| ( ${flags[*]} )" |
44 |
+ readonly PYTHON_USEDEP=${optflags// /,} |
45 |
|
46 |
# 1) well, python-exec would suffice as an RDEP |
47 |
# but no point in making this overcomplex, BDEP doesn't hurt anyone |
48 |
|
49 |
diff --git a/eclass/python-single-r1.eclass b/eclass/python-single-r1.eclass |
50 |
index 1582295..3c33f37 100644 |
51 |
--- a/eclass/python-single-r1.eclass |
52 |
+++ b/eclass/python-single-r1.eclass |
53 |
@@ -238,7 +238,7 @@ _python_single_set_globals() { |
54 |
PYTHON_DEPS+="python_single_target_${i}? ( ${PYTHON_PKG_DEP} ) " |
55 |
done |
56 |
fi |
57 |
- declare -g -r PYTHON_USEDEP=${optflags// /,} |
58 |
+ readonly PYTHON_USEDEP=${optflags// /,} |
59 |
|
60 |
# 1) well, python-exec would suffice as an RDEP |
61 |
# but no point in making this overcomplex, BDEP doesn't hurt anyone |
62 |
|
63 |
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass |
64 |
index cf0e134..42c33eb 100644 |
65 |
--- a/eclass/python-utils-r1.eclass |
66 |
+++ b/eclass/python-utils-r1.eclass |
67 |
@@ -40,7 +40,7 @@ inherit toolchain-funcs |
68 |
# @INTERNAL |
69 |
# @DESCRIPTION: |
70 |
# All supported Python implementations, most preferred last. |
71 |
-declare -g -r _PYTHON_ALL_IMPLS=( |
72 |
+readonly _PYTHON_ALL_IMPLS=( |
73 |
python2_7 |
74 |
python3_3 python3_4 python3_5 |
75 |
pypy pypy3 |