diff options
author | 2021-01-23 00:00:00 +0000 | |
---|---|---|
committer | 2021-01-23 17:50:41 +0000 | |
commit | 79af2476b55a6b01e612c9eb0cb98755a51da780 (patch) | |
tree | 381017b78a3491be15f84edef790b08358001c4d | |
parent | gcc-config: maintain ABI ordering for LDPATH (diff) | |
download | gcc-config-79af2476b55a6b01e612c9eb0cb98755a51da780.tar.gz gcc-config-79af2476b55a6b01e612c9eb0cb98755a51da780.tar.bz2 gcc-config-79af2476b55a6b01e612c9eb0cb98755a51da780.zip |
gcc-config: Do not call 'python' directly.v2.3.3
'python' is not available with dev-lang/python-exec[-native-symlinks].
Bug: https://bugs.gentoo.org/766597
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
-rwxr-xr-x | gcc-config | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -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 |