diff options
author | Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> | 2009-08-02 16:56:41 +0000 |
---|---|---|
committer | Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> | 2009-08-02 16:56:41 +0000 |
commit | 974180ed899a105ebc4695cfc43954774b51ecc3 (patch) | |
tree | a68b49f89431fa6d07c886bb4c2962dc70dedcca /eclass | |
parent | x86 stable, bug #279363 (diff) | |
download | historical-974180ed899a105ebc4695cfc43954774b51ecc3.tar.gz historical-974180ed899a105ebc4695cfc43954774b51ecc3.tar.bz2 historical-974180ed899a105ebc4695cfc43954774b51ecc3.zip |
Add check to ensure that /usr/bin/python and /usr/bin/python-config are scripts.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/python.eclass | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/eclass/python.eclass b/eclass/python.eclass index 14320185c7f4..22a3590aee58 100644 --- a/eclass/python.eclass +++ b/eclass/python.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.56 2009/08/01 22:36:20 arfrever Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.57 2009/08/02 16:56:41 arfrever Exp $ # @ECLASS: python.eclass # @MAINTAINER: @@ -112,6 +112,14 @@ get_python() { # @DESCRIPTION: # Make sure PYTHON_ABIS variable has valid value. validate_PYTHON_ABIS() { + # Ensure that /usr/bin/python and /usr/bin/python-config are scripts. + if [[ "$(</usr/bin/python)" != *"Gentoo Python wrapper script"* ]]; then + die "/usr/bin/python isn't valid script" + fi + if [[ "$(</usr/bin/python-config)" != *"Gentoo python-config wrapper script"* ]]; then + die "/usr/bin/python-config isn't valid script" + fi + # USE_${ABI_TYPE^^} and RESTRICT_${ABI_TYPE^^}_ABIS variables hopefully will be included in EAPI >= 4. if [[ -z "${PYTHON_ABIS}" ]] && has "${EAPI:-0}" 0 1 2 3; then local ABI support_ABI supported_PYTHON_ABIS= restricted_ABI |