From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-848032-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 1EB061384B4 for <garchives@archives.gentoo.org>; Sun, 22 Nov 2015 09:01:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9DD2821C03F; Sun, 22 Nov 2015 09:01:28 +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 14E8521C03F for <gentoo-commits@lists.gentoo.org>; Sun, 22 Nov 2015 09:01:26 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5BD92340890 for <gentoo-commits@lists.gentoo.org>; Sun, 22 Nov 2015 09:01:25 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4B1BE15B4 for <gentoo-commits@lists.gentoo.org>; Sun, 22 Nov 2015 09:01:21 +0000 (UTC) From: "Michał Górny" <mgorny@gentoo.org> 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" <mgorny@gentoo.org> Message-ID: <1448182812.8dbc0765f619dd388376dd2df95cfc8a2bb8f810.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: 8dbc0765f619dd388376dd2df95cfc8a2bb8f810 X-VCS-Branch: python-eapi6 Date: Sun, 22 Nov 2015 09:01:21 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: d25cfc16-437c-4fcd-ae80-12f1a558e48d X-Archives-Hash: 9bcaa6e0b5cce24ea83dad04044b51ab commit: 8dbc0765f619dd388376dd2df95cfc8a2bb8f810 Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Sun Nov 22 08:59:28 2015 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Sun Nov 22 09:00:12 2015 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8dbc0765 python-utils-r1.eclass: Use in-band signalling for exit status of find eclass/python-utils-r1.eclass | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index 6eeba31..61fa486 100644 --- a/eclass/python-utils-r1.eclass +++ b/eclass/python-utils-r1.eclass @@ -1048,6 +1048,11 @@ python_fix_shebang() { local shebang i local error= from= + # normally ${f} starts with ${path} + if [[ ${f} != "${path}"* && ${f} -ne 0 ]]; then + die "'find ${path} -type f -print0' failed" + fi + IFS= read -r shebang <"${f}" || die # First, check if it's shebang at all... @@ -1138,7 +1143,7 @@ python_fix_shebang() { eerror " requested impl: ${EPYTHON}" die "${FUNCNAME}: conversion of incompatible shebang requested" fi - done < <(find "${path}" -type f -print0 || die) + done < <(find "${path}" -type f -print0; echo "${?}") if [[ ! ${any_fixed} ]]; then local cmd=eerror