commit: 0bdbb5fb2d15cd433a8a7d0176ae3c5a3a957373 Author: Mike Frysinger <vapier <AT> gentoo <DOT> org> AuthorDate: Thu Jun 2 15:26:55 2016 +0000 Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> CommitDate: Thu Jun 2 15:26:55 2016 +0000 URL: https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=0bdbb5fb
crossdev: make multilib eclass loading/parsing more robust Be a bit more proactive in detecting errors so we don't hit another infinite loop. URL: https://bugs.gentoo.org/531044 Reported-by: Ulrar <lemonnier.k <AT> gmail.com> Reported-by: Samuel Loewen <samuellwn <AT> gmail.com> crossdev | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/crossdev b/crossdev index 686b906..5cb319c 100755 --- a/crossdev +++ b/crossdev @@ -739,7 +739,7 @@ if [[ -e ${d}/env ]] ; then fi # parse multilib settings until profiles are sane -multilib_env() { +load_multilib_env() { local var=$1 eval $( # see what target to parse @@ -764,7 +764,10 @@ multilib_env() { else single_abi=false fi - multilib_env + if ! multilib_env ; then + echo "die 'could not load multilib settings for ${var}'" + exit 1 + fi ${single_abi} && MULTILIB_ABIS=${DEFAULT_ABI} # output the desired env @@ -792,10 +795,10 @@ multilib_env() { ) } # Load settings for the host. -MULTILIB_ABIS=${HOST_ABI} multilib_env HCHOST +MULTILIB_ABIS=${HOST_ABI} load_multilib_env HCHOST HOST_ABI=${_MULTILIB_ABIS} # Load settings for the target. -multilib_env CTARGET +load_multilib_env CTARGET DEFAULT_ABI=${MULTILIB_ABIS%% *} if [[ -z ${MULTILIB_USE} ]] ; then
