commit: 317c3157ec6aa4eb73b0228b8cd44234a099c362
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 18 19:44:27 2015 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> 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 ${?}
)
}