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 1/9] multilib-build.eclass: Mark eclass-generated variables read-only
Date: Sun, 06 Dec 2015 18:58:27
Message-Id: 1449428274-20439-2-git-send-email-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCHES] multilib-build & multilib-minimal EAPI 6 patchset by "Michał Górny"
1 ---
2 eclass/multilib-build.eclass | 7 ++++---
3 1 file changed, 4 insertions(+), 3 deletions(-)
4
5 diff --git a/eclass/multilib-build.eclass b/eclass/multilib-build.eclass
6 index ca0fd544..dd03553 100644
7 --- a/eclass/multilib-build.eclass
8 +++ b/eclass/multilib-build.eclass
9 @@ -37,7 +37,7 @@ inherit multibuild multilib
10 # Please contact multilib before modifying this list. This way we can
11 # ensure that every *preliminary* work is done and the multilib can be
12 # extended safely.
13 -_MULTILIB_FLAGS=(
14 +declare -g -r _MULTILIB_FLAGS=(
15 abi_x86_32:x86,x86_fbsd,x86_freebsd,x86_linux,x86_macos,x86_solaris
16 abi_x86_64:amd64,amd64_fbsd,x64_freebsd,amd64_linux,x64_macos,x64_solaris
17 abi_x86_x32:x32
18 @@ -123,7 +123,7 @@ _multilib_build_set_globals() {
19 local usedeps=${flags[@]/%/(-)?}
20
21 IUSE=${flags[*]}
22 - MULTILIB_USEDEP=${usedeps// /,}
23 + declare -g -r MULTILIB_USEDEP=${usedeps// /,}
24 }
25 _multilib_build_set_globals
26
27 @@ -196,9 +196,10 @@ _multilib_multibuild_wrapper() {
28 debug-print-function ${FUNCNAME} "${@}"
29
30 local ABI=${MULTIBUILD_VARIANT#*.}
31 - local MULTILIB_ABI_FLAG=${MULTIBUILD_VARIANT%.*}
32 + local -r MULTILIB_ABI_FLAG=${MULTIBUILD_VARIANT%.*}
33
34 multilib_toolchain_setup "${ABI}"
35 + readonly ABI
36 "${@}"
37 }
38
39 --
40 2.6.3