1 |
commit: 0bdbb5fb2d15cd433a8a7d0176ae3c5a3a957373 |
2 |
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jun 2 15:26:55 2016 +0000 |
4 |
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jun 2 15:26:55 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=0bdbb5fb |
7 |
|
8 |
crossdev: make multilib eclass loading/parsing more robust |
9 |
|
10 |
Be a bit more proactive in detecting errors so we don't hit another |
11 |
infinite loop. |
12 |
|
13 |
URL: https://bugs.gentoo.org/531044 |
14 |
Reported-by: Ulrar <lemonnier.k <AT> gmail.com> |
15 |
Reported-by: Samuel Loewen <samuellwn <AT> gmail.com> |
16 |
|
17 |
crossdev | 11 +++++++---- |
18 |
1 file changed, 7 insertions(+), 4 deletions(-) |
19 |
|
20 |
diff --git a/crossdev b/crossdev |
21 |
index 686b906..5cb319c 100755 |
22 |
--- a/crossdev |
23 |
+++ b/crossdev |
24 |
@@ -739,7 +739,7 @@ if [[ -e ${d}/env ]] ; then |
25 |
fi |
26 |
|
27 |
# parse multilib settings until profiles are sane |
28 |
-multilib_env() { |
29 |
+load_multilib_env() { |
30 |
local var=$1 |
31 |
eval $( |
32 |
# see what target to parse |
33 |
@@ -764,7 +764,10 @@ multilib_env() { |
34 |
else |
35 |
single_abi=false |
36 |
fi |
37 |
- multilib_env |
38 |
+ if ! multilib_env ; then |
39 |
+ echo "die 'could not load multilib settings for ${var}'" |
40 |
+ exit 1 |
41 |
+ fi |
42 |
${single_abi} && MULTILIB_ABIS=${DEFAULT_ABI} |
43 |
|
44 |
# output the desired env |
45 |
@@ -792,10 +795,10 @@ multilib_env() { |
46 |
) |
47 |
} |
48 |
# Load settings for the host. |
49 |
-MULTILIB_ABIS=${HOST_ABI} multilib_env HCHOST |
50 |
+MULTILIB_ABIS=${HOST_ABI} load_multilib_env HCHOST |
51 |
HOST_ABI=${_MULTILIB_ABIS} |
52 |
# Load settings for the target. |
53 |
-multilib_env CTARGET |
54 |
+load_multilib_env CTARGET |
55 |
|
56 |
DEFAULT_ABI=${MULTILIB_ABIS%% *} |
57 |
if [[ -z ${MULTILIB_USE} ]] ; then |