From 79af2476b55a6b01e612c9eb0cb98755a51da780 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Sat, 23 Jan 2021 00:00:00 +0000 Subject: gcc-config: Do not call 'python' directly. 'python' is not available with dev-lang/python-exec[-native-symlinks]. Bug: https://bugs.gentoo.org/766597 Signed-off-by: Arfrever Frehtes Taifersar Arahesis Signed-off-by: Sergei Trofimovich --- gcc-config | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/gcc-config b/gcc-config index 615e43b..0eb1b5f 100755 --- a/gcc-config +++ b/gcc-config @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2002-2019 Gentoo Authors +# Copyright 2002-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # Format of /etc/env.d/gcc/ contents: @@ -155,11 +155,10 @@ get_chost() { export CHOST - # make sure portage isnt broken - if python -V &>/dev/null ; then - CHOST=$(portageq envvar CHOST 2>/dev/null) - else - ewarn "Python seems to be broken, attempting to locate CHOST ourselves ..." + # Make sure Portage isn't broken. + CHOST=$(portageq envvar CHOST 2>/dev/null) + if [[ $? != 0 || -z ${CHOST} ]] ; then + ewarn "Python or Portage seems to be broken, attempting to locate CHOST ourselves ..." CHOST=$(try_real_hard_to_find_CHOST) fi -- cgit v1.2.3-65-gdbad