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 5BB601384B4 for ; Thu, 19 Nov 2015 07:28:06 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 950EC21C022; Thu, 19 Nov 2015 07:28:03 +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 643B421C026 for ; Thu, 19 Nov 2015 07:28:02 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 939163408EA for ; Thu, 19 Nov 2015 07:28:01 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2093A1067 for ; Thu, 19 Nov 2015 07:27:58 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1447917994.317c3157ec6aa4eb73b0228b8cd44234a099c362.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:python-eapi6 commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/python-utils-r1.eclass X-VCS-Directories: eclass/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 317c3157ec6aa4eb73b0228b8cd44234a099c362 X-VCS-Branch: python-eapi6 Date: Thu, 19 Nov 2015 07:27:58 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: ecc032f4-517a-4a54-899f-b095fba0f073 X-Archives-Hash: dc6aacaea5d7570c396c0ac064229a42 commit: 317c3157ec6aa4eb73b0228b8cd44234a099c362 Author: Michał Górny gentoo org> AuthorDate: Wed Nov 18 19:44:27 2015 +0000 Commit: Michał Górny gentoo org> CommitDate: Thu Nov 19 07:26:34 2015 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=317c3157 python-utils-r1.eclass: Support nonfatal in python_do* and python_new* eclass/python-utils-r1.eclass | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index 59e8799..5f95f6a 100644 --- a/eclass/python-utils-r1.eclass +++ b/eclass/python-utils-r1.eclass @@ -666,6 +666,8 @@ python_newexe() { if [[ ${EAPI:-0} == [01234] ]]; then die "python_do* and python_new* helpers are banned in EAPIs older than 5." fi + local die_args=() + [[ ${EAPI} != [012345] ]] && die_args+=( -n ) local wrapd=${python_scriptroot:-${DESTTREE}/bin} @@ -679,12 +681,12 @@ python_newexe() { ( dodir "${wrapd}" exeinto "${d}" - newexe "${f}" "${newfn}" || die + newexe "${f}" "${newfn}" || return ${?} ) # install the wrapper _python_ln_rel "${ED%/}"/usr/lib/python-exec/python-exec2 \ - "${ED%/}/${wrapd}/${newfn}" || die + "${ED%/}/${wrapd}/${newfn}" || die "${die_args[@]}" || return ${?} # don't use this at home, just call python_doscript() instead if [[ ${_PYTHON_REWRITE_SHEBANG} ]]; then @@ -811,7 +813,7 @@ python_domodule() { ( insinto "${d}" - doins -r "${@}" || die + doins -r "${@}" || return ${?} ) python_optimize "${ED}/${d}" @@ -845,7 +847,7 @@ python_doheader() { ( insinto "${d}" - doins -r "${@}" || die + doins -r "${@}" || return ${?} ) }