From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id BC7191384B4 for ; Sun, 22 Nov 2015 19:52:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id ACB3E21C014; Sun, 22 Nov 2015 19:51:22 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id AD94D21C005 for ; Sun, 22 Nov 2015 19:51:20 +0000 (UTC) Received: from localhost.localdomain (d202-251.icpnet.pl [109.173.202.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 44B8934085D; Sun, 22 Nov 2015 19:51:19 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Cc: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-dev] [PATCH 01/29] python-utils-r1.eclass: Add missing ||die for external getters Date: Sun, 22 Nov 2015 20:50:42 +0100 Message-Id: <1448221870-17269-2-git-send-email-mgorny@gentoo.org> X-Mailer: git-send-email 2.6.3 In-Reply-To: <1448221870-17269-1-git-send-email-mgorny@gentoo.org> References: <1448221870-17269-1-git-send-email-mgorny@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Archives-Salt: 355e19b2-a652-4fa9-bdaa-fb32b884b09f X-Archives-Hash: 05cceba18d71c02eeb4cf8433a3f79ab --- eclass/python-utils-r1.eclass | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index 6ff1dd1..1362ff9 100644 --- a/eclass/python-utils-r1.eclass +++ b/eclass/python-utils-r1.eclass @@ -280,12 +280,12 @@ python_export() { # sysconfig can't be used because: # 1) pypy doesn't give site-packages but stdlib # 2) jython gives paths with wrong case - export PYTHON_SITEDIR=$("${PYTHON}" -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_lib())') + export PYTHON_SITEDIR=$("${PYTHON}" -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_lib())' || die) debug-print "${FUNCNAME}: PYTHON_SITEDIR = ${PYTHON_SITEDIR}" ;; PYTHON_INCLUDEDIR) [[ -n ${PYTHON} ]] || die "PYTHON needs to be set for ${var} to be exported, or requested before it" - export PYTHON_INCLUDEDIR=$("${PYTHON}" -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_inc())') + export PYTHON_INCLUDEDIR=$("${PYTHON}" -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_inc())' || die) debug-print "${FUNCNAME}: PYTHON_INCLUDEDIR = ${PYTHON_INCLUDEDIR}" # Jython gives a non-existing directory @@ -295,7 +295,7 @@ python_export() { ;; PYTHON_LIBPATH) [[ -n ${PYTHON} ]] || die "PYTHON needs to be set for ${var} to be exported, or requested before it" - export PYTHON_LIBPATH=$("${PYTHON}" -c 'import os.path, sysconfig; print(os.path.join(sysconfig.get_config_var("LIBDIR"), sysconfig.get_config_var("LDLIBRARY")) if sysconfig.get_config_var("LDLIBRARY") else "")') + export PYTHON_LIBPATH=$("${PYTHON}" -c 'import os.path, sysconfig; print(os.path.join(sysconfig.get_config_var("LIBDIR"), sysconfig.get_config_var("LDLIBRARY")) if sysconfig.get_config_var("LDLIBRARY") else "")' || die) debug-print "${FUNCNAME}: PYTHON_LIBPATH = ${PYTHON_LIBPATH}" if [[ ! ${PYTHON_LIBPATH} ]]; then @@ -308,7 +308,7 @@ python_export() { case "${impl}" in python*) # python-2.7, python-3.2, etc. - val=$($(tc-getPKG_CONFIG) --cflags ${impl/n/n-}) + val=$($(tc-getPKG_CONFIG) --cflags ${impl/n/n-} || die) ;; *) die "${impl}: obtaining ${var} not supported" @@ -324,7 +324,7 @@ python_export() { case "${impl}" in python*) # python-2.7, python-3.2, etc. - val=$($(tc-getPKG_CONFIG) --libs ${impl/n/n-}) + val=$($(tc-getPKG_CONFIG) --libs ${impl/n/n-} || die) ;; *) die "${impl}: obtaining ${var} not supported" @@ -340,7 +340,7 @@ python_export() { case "${impl}" in python*) [[ -n ${PYTHON} ]] || die "PYTHON needs to be set for ${var} to be exported, or requested before it" - flags=$("${PYTHON}" -c 'import sysconfig; print(sysconfig.get_config_var("ABIFLAGS") or "")') + flags=$("${PYTHON}" -c 'import sysconfig; print(sysconfig.get_config_var("ABIFLAGS") or "")' || die) val=${PYTHON}${flags}-config ;; *) @@ -579,7 +579,7 @@ python_optimize() { if [[ ${f} == /* && -d ${D}${f} ]]; then set -- "${D}${f}" "${@}" fi - done < <("${PYTHON}" -c 'import sys; print("\0".join(sys.path))') + done < <("${PYTHON}" -c 'import sys; print("\0".join(sys.path))' || die) debug-print "${FUNCNAME}: using sys.path: ${*/%/;}" fi @@ -1128,7 +1128,7 @@ python_fix_shebang() { eerror " requested impl: ${EPYTHON}" die "${FUNCNAME}: conversion of incompatible shebang requested" fi - done < <(find "${path}" -type f -print0) + done < <(find "${path}" -type f -print0 || die) if [[ ! ${any_fixed} ]]; then eqawarn "QA warning: ${FUNCNAME}, ${path#${D}} did not match any fixable files." -- 2.6.3