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