* [gentoo-dev] [PATCH 01/29] python-utils-r1.eclass: Add missing ||die for external getters
2015-11-22 19:50 [gentoo-dev] [PATCHES] Clean-up & EAPI 6 support for python-r1 suite Michał Górny
@ 2015-11-22 19:50 ` Michał Górny
2015-11-22 19:50 ` [gentoo-dev] [PATCH 02/29] python-utils-r1.eclass: Add missing ||die on 'cat' file writes Michał Górny
` (29 subsequent siblings)
30 siblings, 0 replies; 43+ messages in thread
From: Michał Górny @ 2015-11-22 19:50 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
---
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
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-dev] [PATCH 02/29] python-utils-r1.eclass: Add missing ||die on 'cat' file writes
2015-11-22 19:50 [gentoo-dev] [PATCHES] Clean-up & EAPI 6 support for python-r1 suite Michał Górny
2015-11-22 19:50 ` [gentoo-dev] [PATCH 01/29] python-utils-r1.eclass: Add missing ||die for external getters Michał Górny
@ 2015-11-22 19:50 ` Michał Górny
2015-11-22 19:50 ` [gentoo-dev] [PATCH 03/29] python-utils-r1.eclass: Add missing ||die on file read Michał Górny
` (28 subsequent siblings)
30 siblings, 0 replies; 43+ messages in thread
From: Michał Górny @ 2015-11-22 19:50 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
---
eclass/python-utils-r1.eclass | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 1362ff9..0a04e12 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -891,7 +891,7 @@ python_wrapper_setup() {
# note: we don't use symlinks because python likes to do some
# symlink reading magic that breaks stuff
# https://bugs.gentoo.org/show_bug.cgi?id=555752
- cat > "${workdir}/bin/python" <<-_EOF_
+ cat > "${workdir}/bin/python" <<-_EOF_ || die
#!/bin/sh
exec "${PYTHON}" "\${@}"
_EOF_
@@ -904,7 +904,7 @@ python_wrapper_setup() {
if [[ ${EPYTHON} == python* ]]; then
python_export "${impl}" PYTHON_CONFIG
- cat > "${workdir}/bin/python-config" <<-_EOF_
+ cat > "${workdir}/bin/python-config" <<-_EOF_ || die
#!/bin/sh
exec "${PYTHON_CONFIG}" "\${@}"
_EOF_
@@ -926,7 +926,7 @@ python_wrapper_setup() {
local x
for x in "${nonsupp[@]}"; do
- cat >"${workdir}"/bin/${x} <<__EOF__
+ cat >"${workdir}"/bin/${x} <<__EOF__ || die
#!/bin/sh
echo "${x} is not supported by ${EPYTHON}" >&2
exit 127
--
2.6.3
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-dev] [PATCH 03/29] python-utils-r1.eclass: Add missing ||die on file read
2015-11-22 19:50 [gentoo-dev] [PATCHES] Clean-up & EAPI 6 support for python-r1 suite Michał Górny
2015-11-22 19:50 ` [gentoo-dev] [PATCH 01/29] python-utils-r1.eclass: Add missing ||die for external getters Michał Górny
2015-11-22 19:50 ` [gentoo-dev] [PATCH 02/29] python-utils-r1.eclass: Add missing ||die on 'cat' file writes Michał Górny
@ 2015-11-22 19:50 ` Michał Górny
2015-11-25 16:16 ` Michał Górny
2015-11-22 19:50 ` [gentoo-dev] [PATCH 04/29] python-utils-r1.eclass: Remove py2.6 note from python_optimize Michał Górny
` (27 subsequent siblings)
30 siblings, 1 reply; 43+ messages in thread
From: Michał Górny @ 2015-11-22 19:50 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
---
eclass/python-utils-r1.eclass | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 0a04e12..201b0c4 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -1038,12 +1038,12 @@ python_fix_shebang() {
local shebang i
local error= from=
- IFS= read -r shebang <"${f}"
+ IFS= read -r shebang <"${f}" || die
# First, check if it's shebang at all...
if [[ ${shebang} == '#!'* ]]; then
local split_shebang=()
- read -r -a split_shebang <<<${shebang}
+ read -r -a split_shebang <<<${shebang} || die
# Match left-to-right in a loop, to avoid matching random
# repetitions like 'python2.7 python2'.
--
2.6.3
^ permalink raw reply related [flat|nested] 43+ messages in thread
* Re: [gentoo-dev] [PATCH 03/29] python-utils-r1.eclass: Add missing ||die on file read
2015-11-22 19:50 ` [gentoo-dev] [PATCH 03/29] python-utils-r1.eclass: Add missing ||die on file read Michał Górny
@ 2015-11-25 16:16 ` Michał Górny
2015-11-26 22:26 ` Michał Górny
0 siblings, 1 reply; 43+ messages in thread
From: Michał Górny @ 2015-11-25 16:16 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 777 bytes --]
On Sun, 22 Nov 2015 20:50:44 +0100
Michał Górny <mgorny@gentoo.org> wrote:
> ---
> eclass/python-utils-r1.eclass | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
> index 0a04e12..201b0c4 100644
> --- a/eclass/python-utils-r1.eclass
> +++ b/eclass/python-utils-r1.eclass
> @@ -1038,12 +1038,12 @@ python_fix_shebang() {
> local shebang i
> local error= from=
>
> - IFS= read -r shebang <"${f}"
> + IFS= read -r shebang <"${f}" || die
This gives failure for empty files. We need to revert it, and possibly
find a better way of distinguishing I/O failure from 'no input' error.
--
Best regards,
Michał Górny
<http://dev.gentoo.org/~mgorny/>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 949 bytes --]
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [gentoo-dev] [PATCH 03/29] python-utils-r1.eclass: Add missing ||die on file read
2015-11-25 16:16 ` Michał Górny
@ 2015-11-26 22:26 ` Michał Górny
0 siblings, 0 replies; 43+ messages in thread
From: Michał Górny @ 2015-11-26 22:26 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 959 bytes --]
On Wed, 25 Nov 2015 17:16:24 +0100
Michał Górny <mgorny@gentoo.org> wrote:
> On Sun, 22 Nov 2015 20:50:44 +0100
> Michał Górny <mgorny@gentoo.org> wrote:
>
> > ---
> > eclass/python-utils-r1.eclass | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
> > index 0a04e12..201b0c4 100644
> > --- a/eclass/python-utils-r1.eclass
> > +++ b/eclass/python-utils-r1.eclass
> > @@ -1038,12 +1038,12 @@ python_fix_shebang() {
> > local shebang i
> > local error= from=
> >
> > - IFS= read -r shebang <"${f}"
> > + IFS= read -r shebang <"${f}" || die
>
> This gives failure for empty files. We need to revert it, and possibly
> find a better way of distinguishing I/O failure from 'no input' error.
Going to add two more patches, one of them fixing this.
--
Best regards,
Michał Górny
<http://dev.gentoo.org/~mgorny/>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 949 bytes --]
^ permalink raw reply [flat|nested] 43+ messages in thread
* [gentoo-dev] [PATCH 04/29] python-utils-r1.eclass: Remove py2.6 note from python_optimize
2015-11-22 19:50 [gentoo-dev] [PATCHES] Clean-up & EAPI 6 support for python-r1 suite Michał Górny
` (2 preceding siblings ...)
2015-11-22 19:50 ` [gentoo-dev] [PATCH 03/29] python-utils-r1.eclass: Add missing ||die on file read Michał Górny
@ 2015-11-22 19:50 ` Michał Górny
2015-11-22 19:50 ` [gentoo-dev] [PATCH 05/29] python-utils-r1.eclass: Replace local INSDESTTREE with subshells Michał Górny
` (26 subsequent siblings)
30 siblings, 0 replies; 43+ messages in thread
From: Michał Górny @ 2015-11-22 19:50 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
---
eclass/python-utils-r1.eclass | 3 ---
1 file changed, 3 deletions(-)
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 201b0c4..9f3c750 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -564,9 +564,6 @@ python_optimize() {
local PYTHON=${PYTHON}
[[ ${PYTHON} ]] || python_export PYTHON
- # Note: python2.6 can't handle passing files to compileall...
- # TODO: we do not support 2.6 any longer
-
# default to sys.path
if [[ ${#} -eq 0 ]]; then
local f
--
2.6.3
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-dev] [PATCH 05/29] python-utils-r1.eclass: Replace local INSDESTTREE with subshells
2015-11-22 19:50 [gentoo-dev] [PATCHES] Clean-up & EAPI 6 support for python-r1 suite Michał Górny
` (3 preceding siblings ...)
2015-11-22 19:50 ` [gentoo-dev] [PATCH 04/29] python-utils-r1.eclass: Remove py2.6 note from python_optimize Michał Górny
@ 2015-11-22 19:50 ` Michał Górny
2015-11-22 19:50 ` [gentoo-dev] [PATCH 06/29] python-utils-r1.eclass: Ban installation helpers in EAPIs < 5 Michał Górny
` (25 subsequent siblings)
30 siblings, 0 replies; 43+ messages in thread
From: Michał Górny @ 2015-11-22 19:50 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
Replace the 'local INSDESTTREE' hacks (which are PMS-valid yet
deprecated) with safer subshells.
---
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 9f3c750..e690e09 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -802,10 +802,10 @@ python_domodule() {
d=${PYTHON_SITEDIR#${EPREFIX}}/${python_moduleroot}
fi
- local INSDESTTREE
-
- insinto "${d}"
- doins -r "${@}" || die
+ (
+ insinto "${d}"
+ doins -r "${@}" || die
+ )
python_optimize "${ED}/${d}"
}
@@ -833,10 +833,10 @@ python_doheader() {
d=${PYTHON_INCLUDEDIR#${EPREFIX}}
- local INSDESTTREE
-
- insinto "${d}"
- doins -r "${@}" || die
+ (
+ insinto "${d}"
+ doins -r "${@}" || die
+ )
}
# @FUNCTION: python_wrapper_setup
--
2.6.3
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-dev] [PATCH 06/29] python-utils-r1.eclass: Ban installation helpers in EAPIs < 5
2015-11-22 19:50 [gentoo-dev] [PATCHES] Clean-up & EAPI 6 support for python-r1 suite Michał Górny
` (4 preceding siblings ...)
2015-11-22 19:50 ` [gentoo-dev] [PATCH 05/29] python-utils-r1.eclass: Replace local INSDESTTREE with subshells Michał Górny
@ 2015-11-22 19:50 ` Michał Górny
2015-11-22 19:50 ` [gentoo-dev] [PATCH 07/29] python-utils-r1.eclass: Make python_fix_shebang QAwarns fatal in EAPI 6 Michał Górny
` (24 subsequent siblings)
30 siblings, 0 replies; 43+ messages in thread
From: Michał Górny @ 2015-11-22 19:50 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
Ban python_do* and python_new* helpers in EAPIs older than 5. We should
ban them in python-any-r1 uses, actually but that would break
dev-python/pypy* ebuilds as they are written now.
---
eclass/python-utils-r1.eclass | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index e690e09..99ee58b 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -662,6 +662,9 @@ python_newexe() {
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
[[ ${#} -eq 2 ]] || die "Usage: ${FUNCNAME} <path> <new-name>"
+ if [[ ${EAPI:-0} == [01234] ]]; then
+ die "python_do* and python_new* helpers are banned in EAPIs older than 5."
+ fi
local wrapd=${python_scriptroot:-${DESTTREE}/bin}
@@ -789,6 +792,9 @@ python_domodule() {
debug-print-function ${FUNCNAME} "${@}"
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
+ if [[ ${EAPI:-0} == [01234] ]]; then
+ die "python_do* and python_new* helpers are banned in EAPIs older than 5."
+ fi
local d
if [[ ${python_moduleroot} == /* ]]; then
@@ -827,6 +833,9 @@ python_doheader() {
debug-print-function ${FUNCNAME} "${@}"
[[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
+ if [[ ${EAPI:-0} == [01234] ]]; then
+ die "python_do* and python_new* helpers are banned in EAPIs older than 5."
+ fi
local d PYTHON_INCLUDEDIR=${PYTHON_INCLUDEDIR}
[[ ${PYTHON_INCLUDEDIR} ]] || python_export PYTHON_INCLUDEDIR
--
2.6.3
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-dev] [PATCH 07/29] python-utils-r1.eclass: Make python_fix_shebang QAwarns fatal in EAPI 6
2015-11-22 19:50 [gentoo-dev] [PATCHES] Clean-up & EAPI 6 support for python-r1 suite Michał Górny
` (5 preceding siblings ...)
2015-11-22 19:50 ` [gentoo-dev] [PATCH 06/29] python-utils-r1.eclass: Ban installation helpers in EAPIs < 5 Michał Górny
@ 2015-11-22 19:50 ` Michał Górny
2015-11-22 19:50 ` [gentoo-dev] [PATCH 08/29] python-utils-r1.eclass: Remove unneeded multilib inherit " Michał Górny
` (23 subsequent siblings)
30 siblings, 0 replies; 43+ messages in thread
From: Michał Górny @ 2015-11-22 19:50 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
---
eclass/python-utils-r1.eclass | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 99ee58b..d8ced41 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -33,7 +33,8 @@ fi
if [[ ! ${_PYTHON_UTILS_R1} ]]; then
-inherit eutils multilib toolchain-funcs
+[[ ${EAPI:-0} == [012345] ]] && inherit eutils
+inherit multilib toolchain-funcs
# @ECLASS-VARIABLE: _PYTHON_ALL_IMPLS
# @INTERNAL
@@ -1137,12 +1138,17 @@ python_fix_shebang() {
done < <(find "${path}" -type f -print0 || die)
if [[ ! ${any_fixed} ]]; then
- eqawarn "QA warning: ${FUNCNAME}, ${path#${D}} did not match any fixable files."
+ local cmd=eerror
+ [[ ${EAPI:-0} == [012345] ]] && cmd=eqawarn
+
+ "${cmd}" "QA warning: ${FUNCNAME}, ${path#${D}} did not match any fixable files."
if [[ ${any_correct} ]]; then
- eqawarn "All files have ${EPYTHON} shebang already."
+ "${cmd}" "All files have ${EPYTHON} shebang already."
else
- eqawarn "There are no Python files in specified directory."
+ "${cmd}" "There are no Python files in specified directory."
fi
+
+ [[ ${cmd} == eerror ]] && die "${FUNCNAME} did not match any fixable files (QA warning fatal in EAPI ${EAPI})"
fi
done
}
--
2.6.3
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-dev] [PATCH 08/29] python-utils-r1.eclass: Remove unneeded multilib inherit in EAPI 6
2015-11-22 19:50 [gentoo-dev] [PATCHES] Clean-up & EAPI 6 support for python-r1 suite Michał Górny
` (6 preceding siblings ...)
2015-11-22 19:50 ` [gentoo-dev] [PATCH 07/29] python-utils-r1.eclass: Make python_fix_shebang QAwarns fatal in EAPI 6 Michał Górny
@ 2015-11-22 19:50 ` Michał Górny
2015-11-22 19:50 ` [gentoo-dev] [PATCH 09/29] python-utils-r1.eclass: Support nonfatal in python_do* and python_new* Michał Górny
` (22 subsequent siblings)
30 siblings, 0 replies; 43+ messages in thread
From: Michał Górny @ 2015-11-22 19:50 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
---
eclass/python-utils-r1.eclass | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index d8ced41..59e8799 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -33,8 +33,8 @@ fi
if [[ ! ${_PYTHON_UTILS_R1} ]]; then
-[[ ${EAPI:-0} == [012345] ]] && inherit eutils
-inherit multilib toolchain-funcs
+[[ ${EAPI:-0} == [012345] ]] && inherit eutils multilib
+inherit toolchain-funcs
# @ECLASS-VARIABLE: _PYTHON_ALL_IMPLS
# @INTERNAL
--
2.6.3
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-dev] [PATCH 09/29] python-utils-r1.eclass: Support nonfatal in python_do* and python_new*
2015-11-22 19:50 [gentoo-dev] [PATCHES] Clean-up & EAPI 6 support for python-r1 suite Michał Górny
` (7 preceding siblings ...)
2015-11-22 19:50 ` [gentoo-dev] [PATCH 08/29] python-utils-r1.eclass: Remove unneeded multilib inherit " Michał Górny
@ 2015-11-22 19:50 ` Michał Górny
2015-11-22 19:50 ` [gentoo-dev] [PATCH 10/29] python-utils-r1.eclass: Make heredocs consistent Michał Górny
` (21 subsequent siblings)
30 siblings, 0 replies; 43+ messages in thread
From: Michał Górny @ 2015-11-22 19:50 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
---
eclass/python-utils-r1.eclass | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 59e8799..7617c3f 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -679,7 +679,7 @@ python_newexe() {
(
dodir "${wrapd}"
exeinto "${d}"
- newexe "${f}" "${newfn}" || die
+ newexe "${f}" "${newfn}" || return ${?}
)
# install the wrapper
@@ -811,7 +811,7 @@ python_domodule() {
(
insinto "${d}"
- doins -r "${@}" || die
+ doins -r "${@}" || return ${?}
)
python_optimize "${ED}/${d}"
@@ -845,7 +845,7 @@ python_doheader() {
(
insinto "${d}"
- doins -r "${@}" || die
+ doins -r "${@}" || return ${?}
)
}
--
2.6.3
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-dev] [PATCH 10/29] python-utils-r1.eclass: Make heredocs consistent
2015-11-22 19:50 [gentoo-dev] [PATCHES] Clean-up & EAPI 6 support for python-r1 suite Michał Górny
` (8 preceding siblings ...)
2015-11-22 19:50 ` [gentoo-dev] [PATCH 09/29] python-utils-r1.eclass: Support nonfatal in python_do* and python_new* Michał Górny
@ 2015-11-22 19:50 ` Michał Górny
2015-11-23 10:55 ` Justin Lecher (jlec)
2015-11-22 19:50 ` [gentoo-dev] [PATCH 11/29] python-utils-r1.eclass: Move ||die out of command substitution subshells Michał Górny
` (20 subsequent siblings)
30 siblings, 1 reply; 43+ messages in thread
From: Michał Górny @ 2015-11-22 19:50 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
---
eclass/python-utils-r1.eclass | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 7617c3f..6fb1ec5 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -933,11 +933,11 @@ python_wrapper_setup() {
local x
for x in "${nonsupp[@]}"; do
- cat >"${workdir}"/bin/${x} <<__EOF__ || die
-#!/bin/sh
-echo "${x} is not supported by ${EPYTHON}" >&2
-exit 127
-__EOF__
+ cat >"${workdir}"/bin/${x} <<-_EOF_ || die
+ #!/bin/sh
+ echo "${x} is not supported by ${EPYTHON}" >&2
+ exit 127
+_EOF_
chmod +x "${workdir}"/bin/${x} || die
done
--
2.6.3
^ permalink raw reply related [flat|nested] 43+ messages in thread
* Re: [gentoo-dev] [PATCH 10/29] python-utils-r1.eclass: Make heredocs consistent
2015-11-22 19:50 ` [gentoo-dev] [PATCH 10/29] python-utils-r1.eclass: Make heredocs consistent Michał Górny
@ 2015-11-23 10:55 ` Justin Lecher (jlec)
2015-11-25 12:00 ` [gentoo-dev] [PATCH] " Michał Górny
0 siblings, 1 reply; 43+ messages in thread
From: Justin Lecher (jlec) @ 2015-11-23 10:55 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
On 22/11/15 20:50, Micha? Górny wrote:
> --- eclass/python-utils-r1.eclass | 10 +++++----- 1 file changed, 5
> insertions(+), 5 deletions(-)
>
> diff --git a/eclass/python-utils-r1.eclass
> b/eclass/python-utils-r1.eclass index 7617c3f..6fb1ec5 100644 ---
> a/eclass/python-utils-r1.eclass +++
> b/eclass/python-utils-r1.eclass @@ -933,11 +933,11 @@
> python_wrapper_setup() {
>
> local x for x in "${nonsupp[@]}"; do - cat >"${workdir}"/bin/${x}
> <<__EOF__ || die -#!/bin/sh -echo "${x} is not supported by
> ${EPYTHON}" >&2 -exit 127 -__EOF__ + cat >"${workdir}"/bin/${x}
> <<-_EOF_ || die + #!/bin/sh + echo "${x} is not supported by
> ${EPYTHON}" >&2 + exit 127 +_EOF_
Why not indenting this line?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0
iQJ8BAEBCgBmBQJWUvCNXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ0QUU0N0I4NzFERUI0MTJFN0EyODE0NUFF
OTQwMkE3OUIwMzUyOUEyAAoJEOlAKnmwNSmiqWwQAJaI+wQ35CBxT7ZSxLMBtA3x
TtafJinkacJBbSzxgXHnQ/RprAoRO6Utg2ijJh3rYxu8LCD6Al/iF23MtcdzhBWe
oU6KXVzCQI5A+47EFDGifD+GHWkIDwcCepKF+4xKpUGSeN4sxLrENAXt4YysjFPo
QN29+zx4IAsCj/EZmi5ViVCZGA2UdedCkbwbhXUJ5hYXNAS1XPQjFvVCKWp57Ayt
Njj4sVgOJB7kWcZYV6URzv1TFPENSbEI3/H3RpVJAQCnzQLDux0Evy5dNlBG73RU
OnX2mXdZYWibIYgLR6zCtZpiOKcmiIOBlx/PZSgT0ylrHsgzPt7+WY3AEZxtcr+X
9Hii2Qb4WfOXAaVIDSIwUgg44AVSKY5yz+IRmQ6Q7L7u4qmQUMs6JEIb4LJ2oCRH
wbmA/D3exiVEGTzeKI3DQnupkpCeEdtY70R38DmI7Jv6vyLI8mvxw/muTaDh2wF7
7PB3S1HPYsfoje+7GO9g4Bq0xVwssn4XqIvRzwO82nbGHCLA8kPT4q0sevl5iUQY
c+g8X4n34re/wj/uH0j1skkx49VNrZvd0HZ7JzT4XcGK6s673SK8pcJLlYzjInpF
IO4PqBZkRkYPPhyfj8YjbtluquPtQExVBAAQOWF/LlZ9AzHhxkgoxv4lwxFK56/l
NPR5/VPzuJOHWB5pcG2C
=XqEp
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 43+ messages in thread
* [gentoo-dev] [PATCH] python-utils-r1.eclass: Make heredocs consistent
2015-11-23 10:55 ` Justin Lecher (jlec)
@ 2015-11-25 12:00 ` Michał Górny
0 siblings, 0 replies; 43+ messages in thread
From: Michał Górny @ 2015-11-25 12:00 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
---
eclass/python-utils-r1.eclass | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 7617c3f..4307142 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -933,11 +933,11 @@ python_wrapper_setup() {
local x
for x in "${nonsupp[@]}"; do
- cat >"${workdir}"/bin/${x} <<__EOF__ || die
-#!/bin/sh
-echo "${x} is not supported by ${EPYTHON}" >&2
-exit 127
-__EOF__
+ cat >"${workdir}"/bin/${x} <<-_EOF_ || die
+ #!/bin/sh
+ echo "${x} is not supported by ${EPYTHON}" >&2
+ exit 127
+ _EOF_
chmod +x "${workdir}"/bin/${x} || die
done
--
2.6.3
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-dev] [PATCH 11/29] python-utils-r1.eclass: Move ||die out of command substitution subshells
2015-11-22 19:50 [gentoo-dev] [PATCHES] Clean-up & EAPI 6 support for python-r1 suite Michał Górny
` (9 preceding siblings ...)
2015-11-22 19:50 ` [gentoo-dev] [PATCH 10/29] python-utils-r1.eclass: Make heredocs consistent Michał Górny
@ 2015-11-22 19:50 ` Michał Górny
2015-11-22 22:33 ` Davide Pesavento
2015-11-22 19:50 ` [gentoo-dev] [PATCH 12/29] python-utils-r1.eclass: Enable EAPI 6 Michał Górny
` (19 subsequent siblings)
30 siblings, 1 reply; 43+ messages in thread
From: Michał Górny @ 2015-11-22 19:50 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
---
eclass/python-utils-r1.eclass | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 6fb1ec5..ce6f2d1 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -281,12 +281,14 @@ 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())' || die)
+ PYTHON_SITEDIR=$("${PYTHON}" -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_lib())') || die
+ export PYTHON_SITEDIR
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())' || die)
+ PYTHON_INCLUDEDIR=$("${PYTHON}" -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_inc())') || die
+ export PYTHON_INCLUDEDIR
debug-print "${FUNCNAME}: PYTHON_INCLUDEDIR = ${PYTHON_INCLUDEDIR}"
# Jython gives a non-existing directory
@@ -296,7 +298,8 @@ 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 "")' || die)
+ 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
+ export PYTHON_LIBPATH
debug-print "${FUNCNAME}: PYTHON_LIBPATH = ${PYTHON_LIBPATH}"
if [[ ! ${PYTHON_LIBPATH} ]]; then
@@ -309,7 +312,7 @@ python_export() {
case "${impl}" in
python*)
# python-2.7, python-3.2, etc.
- val=$($(tc-getPKG_CONFIG) --cflags ${impl/n/n-} || die)
+ val=$($(tc-getPKG_CONFIG) --cflags ${impl/n/n-}) || die
;;
*)
die "${impl}: obtaining ${var} not supported"
@@ -325,7 +328,7 @@ python_export() {
case "${impl}" in
python*)
# python-2.7, python-3.2, etc.
- val=$($(tc-getPKG_CONFIG) --libs ${impl/n/n-} || die)
+ val=$($(tc-getPKG_CONFIG) --libs ${impl/n/n-}) || die
;;
*)
die "${impl}: obtaining ${var} not supported"
@@ -341,7 +344,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 "")' || die)
+ flags=$("${PYTHON}" -c 'import sysconfig; print(sysconfig.get_config_var("ABIFLAGS") or "")') || die
val=${PYTHON}${flags}-config
;;
*)
--
2.6.3
^ permalink raw reply related [flat|nested] 43+ messages in thread
* Re: [gentoo-dev] [PATCH 11/29] python-utils-r1.eclass: Move ||die out of command substitution subshells
2015-11-22 19:50 ` [gentoo-dev] [PATCH 11/29] python-utils-r1.eclass: Move ||die out of command substitution subshells Michał Górny
@ 2015-11-22 22:33 ` Davide Pesavento
2015-11-22 23:23 ` Michał Górny
0 siblings, 1 reply; 43+ messages in thread
From: Davide Pesavento @ 2015-11-22 22:33 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
On Sun, Nov 22, 2015 at 8:50 PM, Michał Górny <mgorny@gentoo.org> wrote:
> ---
> eclass/python-utils-r1.eclass | 15 +++++++++------
> 1 file changed, 9 insertions(+), 6 deletions(-)
>
Can't you fold this patch into the previous ones that introduced these
die calls?
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [gentoo-dev] [PATCH 11/29] python-utils-r1.eclass: Move ||die out of command substitution subshells
2015-11-22 22:33 ` Davide Pesavento
@ 2015-11-22 23:23 ` Michał Górny
0 siblings, 0 replies; 43+ messages in thread
From: Michał Górny @ 2015-11-22 23:23 UTC (permalink / raw
To: Davide Pesavento; +Cc: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 594 bytes --]
On Sun, 22 Nov 2015 23:33:14 +0100
Davide Pesavento <pesa@gentoo.org> wrote:
> On Sun, Nov 22, 2015 at 8:50 PM, Michał Górny <mgorny@gentoo.org> wrote:
> > ---
> > eclass/python-utils-r1.eclass | 15 +++++++++------
> > 1 file changed, 9 insertions(+), 6 deletions(-)
> >
>
> Can't you fold this patch into the previous ones that introduced these
> die calls?
I probably will, before pushing this. However, for review I kept them
separate in case someone told me to remove this and keep dies inside.
--
Best regards,
Michał Górny
<http://dev.gentoo.org/~mgorny/>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 949 bytes --]
^ permalink raw reply [flat|nested] 43+ messages in thread
* [gentoo-dev] [PATCH 12/29] python-utils-r1.eclass: Enable EAPI 6
2015-11-22 19:50 [gentoo-dev] [PATCHES] Clean-up & EAPI 6 support for python-r1 suite Michał Górny
` (10 preceding siblings ...)
2015-11-22 19:50 ` [gentoo-dev] [PATCH 11/29] python-utils-r1.eclass: Move ||die out of command substitution subshells Michał Górny
@ 2015-11-22 19:50 ` Michał Górny
2015-11-22 19:50 ` [gentoo-dev] [PATCH 13/29] python-any-r1.eclass: Enable EAPI=6, no changes needed Michał Górny
` (18 subsequent siblings)
30 siblings, 0 replies; 43+ messages in thread
From: Michał Górny @ 2015-11-22 19:50 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
---
eclass/python-utils-r1.eclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index ce6f2d1..6eeba31 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -20,7 +20,7 @@
# https://wiki.gentoo.org/wiki/Project:Python/python-utils-r1
case "${EAPI:-0}" in
- 0|1|2|3|4|5)
+ 0|1|2|3|4|5|6)
;;
*)
die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
--
2.6.3
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-dev] [PATCH 13/29] python-any-r1.eclass: Enable EAPI=6, no changes needed
2015-11-22 19:50 [gentoo-dev] [PATCHES] Clean-up & EAPI 6 support for python-r1 suite Michał Górny
` (11 preceding siblings ...)
2015-11-22 19:50 ` [gentoo-dev] [PATCH 12/29] python-utils-r1.eclass: Enable EAPI 6 Michał Górny
@ 2015-11-22 19:50 ` Michał Górny
2015-11-22 19:50 ` [gentoo-dev] [PATCH 14/29] python-single-r1.eclass: " Michał Górny
` (17 subsequent siblings)
30 siblings, 0 replies; 43+ messages in thread
From: Michał Górny @ 2015-11-22 19:50 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
---
eclass/python-any-r1.eclass | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/eclass/python-any-r1.eclass b/eclass/python-any-r1.eclass
index c00cc3a..b6c2258 100644
--- a/eclass/python-any-r1.eclass
+++ b/eclass/python-any-r1.eclass
@@ -37,8 +37,7 @@
# https://wiki.gentoo.org/wiki/Project:Python/python-any-r1
case "${EAPI:-0}" in
- 0|1|2|3|4|5)
- # EAPI=4 needed by python-r1
+ 0|1|2|3|4|5|6)
;;
*)
die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
--
2.6.3
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-dev] [PATCH 14/29] python-single-r1.eclass: Enable EAPI=6, no changes needed
2015-11-22 19:50 [gentoo-dev] [PATCHES] Clean-up & EAPI 6 support for python-r1 suite Michał Górny
` (12 preceding siblings ...)
2015-11-22 19:50 ` [gentoo-dev] [PATCH 13/29] python-any-r1.eclass: Enable EAPI=6, no changes needed Michał Górny
@ 2015-11-22 19:50 ` Michał Górny
2015-11-22 19:50 ` [gentoo-dev] [PATCH 15/29] multibuild.eclass: Ban multibuild_parallel_foreach_variant in EAPI 6 Michał Górny
` (16 subsequent siblings)
30 siblings, 0 replies; 43+ messages in thread
From: Michał Górny @ 2015-11-22 19:50 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
---
eclass/python-single-r1.eclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eclass/python-single-r1.eclass b/eclass/python-single-r1.eclass
index 1c27285..d9fc34b 100644
--- a/eclass/python-single-r1.eclass
+++ b/eclass/python-single-r1.eclass
@@ -55,7 +55,7 @@ case "${EAPI:-0}" in
die "Unsupported EAPI=${EAPI:-4} (too old, allowed only on restricted set of packages) for ${ECLASS}"
fi
;;
- 5)
+ 5|6)
# EAPI=5 is required for sane USE_EXPAND dependencies
;;
*)
--
2.6.3
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-dev] [PATCH 15/29] multibuild.eclass: Ban multibuild_parallel_foreach_variant in EAPI 6
2015-11-22 19:50 [gentoo-dev] [PATCHES] Clean-up & EAPI 6 support for python-r1 suite Michał Górny
` (13 preceding siblings ...)
2015-11-22 19:50 ` [gentoo-dev] [PATCH 14/29] python-single-r1.eclass: " Michał Górny
@ 2015-11-22 19:50 ` Michał Górny
2015-11-22 19:50 ` [gentoo-dev] [PATCH 16/29] multibuild.eclass: Enable " Michał Górny
` (15 subsequent siblings)
30 siblings, 0 replies; 43+ messages in thread
From: Michał Górny @ 2015-11-22 19:50 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
---
eclass/multibuild.eclass | 2 ++
1 file changed, 2 insertions(+)
diff --git a/eclass/multibuild.eclass b/eclass/multibuild.eclass
index 3115ac9..0bdbed1 100644
--- a/eclass/multibuild.eclass
+++ b/eclass/multibuild.eclass
@@ -146,6 +146,8 @@ multibuild_foreach_variant() {
multibuild_parallel_foreach_variant() {
debug-print-function ${FUNCNAME} "${@}"
+ [[ ${EAPI} == [45] ]] || die "${FUNCNAME} is banned in EAPI ${EAPI}"
+
multibuild_foreach_variant "${@}"
}
--
2.6.3
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-dev] [PATCH 16/29] multibuild.eclass: Enable EAPI 6
2015-11-22 19:50 [gentoo-dev] [PATCHES] Clean-up & EAPI 6 support for python-r1 suite Michał Górny
` (14 preceding siblings ...)
2015-11-22 19:50 ` [gentoo-dev] [PATCH 15/29] multibuild.eclass: Ban multibuild_parallel_foreach_variant in EAPI 6 Michał Górny
@ 2015-11-22 19:50 ` Michał Górny
2015-11-22 19:50 ` [gentoo-dev] [PATCH 17/29] python-r1.eclass: Ban python_parallel_foreach_impl in " Michał Górny
` (14 subsequent siblings)
30 siblings, 0 replies; 43+ messages in thread
From: Michał Górny @ 2015-11-22 19:50 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
---
eclass/multibuild.eclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eclass/multibuild.eclass b/eclass/multibuild.eclass
index 0bdbed1..d21008c 100644
--- a/eclass/multibuild.eclass
+++ b/eclass/multibuild.eclass
@@ -17,7 +17,7 @@ case "${EAPI:-0}" in
0|1|2|3)
die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
;;
- 4|5)
+ 4|5|6)
;;
*)
die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
--
2.6.3
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-dev] [PATCH 17/29] python-r1.eclass: Ban python_parallel_foreach_impl in EAPI 6
2015-11-22 19:50 [gentoo-dev] [PATCHES] Clean-up & EAPI 6 support for python-r1 suite Michał Górny
` (15 preceding siblings ...)
2015-11-22 19:50 ` [gentoo-dev] [PATCH 16/29] multibuild.eclass: Enable " Michał Górny
@ 2015-11-22 19:50 ` Michał Górny
2015-11-22 19:50 ` [gentoo-dev] [PATCH 18/29] python-r1.eclass: Ban python_export_best " Michał Górny
` (13 subsequent siblings)
30 siblings, 0 replies; 43+ messages in thread
From: Michał Górny @ 2015-11-22 19:50 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
---
eclass/python-r1.eclass | 2 ++
1 file changed, 2 insertions(+)
diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass
index d3b4f1d..1531442 100644
--- a/eclass/python-r1.eclass
+++ b/eclass/python-r1.eclass
@@ -526,6 +526,8 @@ python_foreach_impl() {
python_parallel_foreach_impl() {
debug-print-function ${FUNCNAME} "${@}"
+ [[ ${EAPI} == [45] ]] || die "${FUNCNAME} is banned in EAPI ${EAPI}"
+
if [[ ! ${_PYTHON_PARALLEL_WARNED} ]]; then
eqawarn "python_parallel_foreach_impl() is no longer meaningful. All runs"
eqawarn "are non-parallel now. Please replace the call with python_foreach_impl."
--
2.6.3
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-dev] [PATCH 18/29] python-r1.eclass: Ban python_export_best in EAPI 6
2015-11-22 19:50 [gentoo-dev] [PATCHES] Clean-up & EAPI 6 support for python-r1 suite Michał Górny
` (16 preceding siblings ...)
2015-11-22 19:50 ` [gentoo-dev] [PATCH 17/29] python-r1.eclass: Ban python_parallel_foreach_impl in " Michał Górny
@ 2015-11-22 19:50 ` Michał Górny
2015-11-22 19:51 ` [gentoo-dev] [PATCH 19/29] python-r1.eclass: Fix missing explicit eutils inherit for EAPI < 6 Michał Górny
` (12 subsequent siblings)
30 siblings, 0 replies; 43+ messages in thread
From: Michał Górny @ 2015-11-22 19:50 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
---
eclass/python-r1.eclass | 2 ++
1 file changed, 2 insertions(+)
diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass
index 1531442..de83bb5 100644
--- a/eclass/python-r1.eclass
+++ b/eclass/python-r1.eclass
@@ -603,6 +603,8 @@ python_setup() {
python_export_best() {
debug-print-function ${FUNCNAME} "${@}"
+ [[ ${EAPI} == [45] ]] || die "${FUNCNAME} is banned in EAPI ${EAPI}"
+
eqawarn "python_export_best() is deprecated. Please use python_setup instead,"
eqawarn "combined with python_export if necessary."
--
2.6.3
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-dev] [PATCH 19/29] python-r1.eclass: Fix missing explicit eutils inherit for EAPI < 6
2015-11-22 19:50 [gentoo-dev] [PATCHES] Clean-up & EAPI 6 support for python-r1 suite Michał Górny
` (17 preceding siblings ...)
2015-11-22 19:50 ` [gentoo-dev] [PATCH 18/29] python-r1.eclass: Ban python_export_best " Michał Górny
@ 2015-11-22 19:51 ` Michał Górny
2015-11-22 19:51 ` [gentoo-dev] [PATCH 20/29] python-r1.eclass: Enable EAPI 6 Michał Górny
` (11 subsequent siblings)
30 siblings, 0 replies; 43+ messages in thread
From: Michał Górny @ 2015-11-22 19:51 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
---
eclass/python-r1.eclass | 1 +
1 file changed, 1 insertion(+)
diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass
index de83bb5..92fa5de 100644
--- a/eclass/python-r1.eclass
+++ b/eclass/python-r1.eclass
@@ -63,6 +63,7 @@ elif [[ ${_PYTHON_ANY_R1} ]]; then
die 'python-r1.eclass can not be used with python-any-r1.eclass.'
fi
+[[ ${EAPI} == [45] ]] && inherit eutils
inherit multibuild python-utils-r1
# @ECLASS-VARIABLE: PYTHON_COMPAT
--
2.6.3
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-dev] [PATCH 20/29] python-r1.eclass: Enable EAPI 6
2015-11-22 19:50 [gentoo-dev] [PATCHES] Clean-up & EAPI 6 support for python-r1 suite Michał Górny
` (18 preceding siblings ...)
2015-11-22 19:51 ` [gentoo-dev] [PATCH 19/29] python-r1.eclass: Fix missing explicit eutils inherit for EAPI < 6 Michał Górny
@ 2015-11-22 19:51 ` Michał Górny
2015-11-22 19:51 ` [gentoo-dev] [PATCH 21/29] distutils-r1.eclass: esetup.py, respect nonfatal in " Michał Górny
` (10 subsequent siblings)
30 siblings, 0 replies; 43+ messages in thread
From: Michał Górny @ 2015-11-22 19:51 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
---
eclass/python-r1.eclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass
index 92fa5de..91f0436 100644
--- a/eclass/python-r1.eclass
+++ b/eclass/python-r1.eclass
@@ -47,7 +47,7 @@ case "${EAPI:-0}" in
die "Unsupported EAPI=${EAPI:-4} (too old, allowed only on restricted set of packages) for ${ECLASS}"
fi
;;
- 5)
+ 5|6)
# EAPI=5 is required for sane USE_EXPAND dependencies
;;
*)
--
2.6.3
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-dev] [PATCH 21/29] distutils-r1.eclass: esetup.py, respect nonfatal in EAPI 6
2015-11-22 19:50 [gentoo-dev] [PATCHES] Clean-up & EAPI 6 support for python-r1 suite Michał Górny
` (19 preceding siblings ...)
2015-11-22 19:51 ` [gentoo-dev] [PATCH 20/29] python-r1.eclass: Enable EAPI 6 Michał Górny
@ 2015-11-22 19:51 ` Michał Górny
2015-11-22 19:51 ` [gentoo-dev] [PATCH 22/29] distutils-r1.eclass: Use default_src_prepare to apply patches " Michał Górny
` (9 subsequent siblings)
30 siblings, 0 replies; 43+ messages in thread
From: Michał Górny @ 2015-11-22 19:51 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
---
eclass/distutils-r1.eclass | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 185dd4f..256c893 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -236,10 +236,13 @@ fi
esetup.py() {
debug-print-function ${FUNCNAME} "${@}"
+ local die_args=()
+ [[ ${EAPI} != [45] ]] && die_args+=( -n )
+
set -- "${PYTHON:-python}" setup.py "${mydistutilsargs[@]}" "${@}"
echo "${@}" >&2
- "${@}" || die
+ "${@}" || die "${die_args[@]}" || return ${?}
}
# @FUNCTION: distutils_install_for_testing
--
2.6.3
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-dev] [PATCH 22/29] distutils-r1.eclass: Use default_src_prepare to apply patches in EAPI 6
2015-11-22 19:50 [gentoo-dev] [PATCHES] Clean-up & EAPI 6 support for python-r1 suite Michał Górny
` (20 preceding siblings ...)
2015-11-22 19:51 ` [gentoo-dev] [PATCH 21/29] distutils-r1.eclass: esetup.py, respect nonfatal in " Michał Górny
@ 2015-11-22 19:51 ` Michał Górny
2015-11-22 19:51 ` [gentoo-dev] [PATCH 23/29] distutils-r1.eclass: Ban no-op default phase implementations " Michał Górny
` (8 subsequent siblings)
30 siblings, 0 replies; 43+ messages in thread
From: Michał Górny @ 2015-11-22 19:51 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
---
eclass/distutils-r1.eclass | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 256c893..f9cff5c 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -312,9 +312,12 @@ _distutils-r1_disable_ez_setup() {
distutils-r1_python_prepare_all() {
debug-print-function ${FUNCNAME} "${@}"
- [[ ${PATCHES} ]] && epatch "${PATCHES[@]}"
-
- epatch_user
+ if [[ ${EAPI} != [45] ]]; then
+ default
+ else
+ [[ ${PATCHES} ]] && epatch "${PATCHES[@]}"
+ epatch_user
+ fi
# by default, use in-source build if python_prepare() is used
if [[ ! ${DISTUTILS_IN_SOURCE_BUILD+1} ]]; then
--
2.6.3
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-dev] [PATCH 23/29] distutils-r1.eclass: Ban no-op default phase implementations in EAPI 6
2015-11-22 19:50 [gentoo-dev] [PATCHES] Clean-up & EAPI 6 support for python-r1 suite Michał Górny
` (21 preceding siblings ...)
2015-11-22 19:51 ` [gentoo-dev] [PATCH 22/29] distutils-r1.eclass: Use default_src_prepare to apply patches " Michał Górny
@ 2015-11-22 19:51 ` Michał Górny
2015-11-22 19:51 ` [gentoo-dev] [PATCH 24/29] distutils-r1.eclass: Make pypy/share QA error fatal " Michał Górny
` (7 subsequent siblings)
30 siblings, 0 replies; 43+ messages in thread
From: Michał Górny @ 2015-11-22 19:51 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
---
eclass/distutils-r1.eclass | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index f9cff5c..47b09b0 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -343,7 +343,7 @@ distutils-r1_python_prepare_all() {
distutils-r1_python_prepare() {
debug-print-function ${FUNCNAME} "${@}"
- :
+ [[ ${EAPI} == [45] ]] || die "${FUNCNAME} is banned in EAPI 6 (it was a no-op)"
}
# @FUNCTION: distutils-r1_python_configure
@@ -352,7 +352,7 @@ distutils-r1_python_prepare() {
distutils-r1_python_configure() {
debug-print-function ${FUNCNAME} "${@}"
- :
+ [[ ${EAPI} == [45] ]] || die "${FUNCNAME} is banned in EAPI 6 (it was a no-op)"
}
# @FUNCTION: _distutils-r1_create_setup_cfg
--
2.6.3
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-dev] [PATCH 24/29] distutils-r1.eclass: Make pypy/share QA error fatal in EAPI 6
2015-11-22 19:50 [gentoo-dev] [PATCHES] Clean-up & EAPI 6 support for python-r1 suite Michał Górny
` (22 preceding siblings ...)
2015-11-22 19:51 ` [gentoo-dev] [PATCH 23/29] distutils-r1.eclass: Ban no-op default phase implementations " Michał Górny
@ 2015-11-22 19:51 ` Michał Górny
2015-11-22 19:51 ` [gentoo-dev] [PATCH 25/29] distutils-r1.eclass: Ban EXAMPLES " Michał Górny
` (6 subsequent siblings)
30 siblings, 0 replies; 43+ messages in thread
From: Michał Górny @ 2015-11-22 19:51 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
---
eclass/distutils-r1.eclass | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 47b09b0..e632202 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -563,7 +563,9 @@ distutils-r1_python_install() {
fi
done
if [[ -d ${root}/usr/$(get_libdir)/pypy/share ]]; then
- eqawarn "Package installs 'share' in PyPy prefix, see bug #465546."
+ local cmd=die
+ [[ ${EAPI} == [45] ]] && cmd=eqawarn
+ "${cmd}" "Package installs 'share' in PyPy prefix, see bug #465546."
fi
if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then
--
2.6.3
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-dev] [PATCH 25/29] distutils-r1.eclass: Ban EXAMPLES in EAPI 6
2015-11-22 19:50 [gentoo-dev] [PATCHES] Clean-up & EAPI 6 support for python-r1 suite Michał Górny
` (23 preceding siblings ...)
2015-11-22 19:51 ` [gentoo-dev] [PATCH 24/29] distutils-r1.eclass: Make pypy/share QA error fatal " Michał Górny
@ 2015-11-22 19:51 ` Michał Górny
2015-11-22 21:14 ` Markus Meier
2015-11-22 19:51 ` [gentoo-dev] [PATCH 26/29] distutils-r1.eclass: Ban DISTUTILS_NO_PARALLEL_BUILD " Michał Górny
` (5 subsequent siblings)
30 siblings, 1 reply; 43+ messages in thread
From: Michał Górny @ 2015-11-22 19:51 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
---
eclass/distutils-r1.eclass | 2 ++
1 file changed, 2 insertions(+)
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index e632202..e55e2e4 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -583,6 +583,8 @@ distutils-r1_python_install_all() {
einstalldocs
if declare -p EXAMPLES &>/dev/null; then
+ [[ ${EAPI} == [45] ]] && die "EXAMPLES are banned in EAPI ${EAPI}"
+
local INSDESTTREE=/usr/share/doc/${PF}/examples
doins -r "${EXAMPLES[@]}"
docompress -x "${INSDESTTREE}"
--
2.6.3
^ permalink raw reply related [flat|nested] 43+ messages in thread
* Re: [gentoo-dev] [PATCH 25/29] distutils-r1.eclass: Ban EXAMPLES in EAPI 6
2015-11-22 19:51 ` [gentoo-dev] [PATCH 25/29] distutils-r1.eclass: Ban EXAMPLES " Michał Górny
@ 2015-11-22 21:14 ` Markus Meier
2015-11-25 12:01 ` [gentoo-dev] [PATCH] " Michał Górny
0 siblings, 1 reply; 43+ messages in thread
From: Markus Meier @ 2015-11-22 21:14 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 768 bytes --]
On Sun, 22 Nov 2015 20:51:06 +0100
Michał Górny <mgorny@gentoo.org> wrote:
> ---
> eclass/distutils-r1.eclass | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
> index e632202..e55e2e4 100644
> --- a/eclass/distutils-r1.eclass
> +++ b/eclass/distutils-r1.eclass
> @@ -583,6 +583,8 @@ distutils-r1_python_install_all() {
> einstalldocs
>
> if declare -p EXAMPLES &>/dev/null; then
> + [[ ${EAPI} == [45] ]] && die "EXAMPLES are banned in
> EAPI ${EAPI}" +
I think the logic is the wrong way around and should be "|| die ..."
> local INSDESTTREE=/usr/share/doc/${PF}/examples
> doins -r "${EXAMPLES[@]}"
> docompress -x "${INSDESTTREE}"
Regards,
Markus
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply [flat|nested] 43+ messages in thread
* [gentoo-dev] [PATCH] distutils-r1.eclass: Ban EXAMPLES in EAPI 6
2015-11-22 21:14 ` Markus Meier
@ 2015-11-25 12:01 ` Michał Górny
0 siblings, 0 replies; 43+ messages in thread
From: Michał Górny @ 2015-11-25 12:01 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
---
eclass/distutils-r1.eclass | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index e632202..1cf2a49 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -150,6 +150,8 @@ fi
# @ECLASS-VARIABLE: EXAMPLES
# @DEFAULT_UNSET
# @DESCRIPTION:
+# OBSOLETE: this variable is deprecated and banned in EAPI 6
+#
# An array containing examples installed into 'examples' doc
# subdirectory. The files and directories listed there must exist
# in the directory from which distutils-r1_python_install_all() is run
@@ -583,6 +585,8 @@ distutils-r1_python_install_all() {
einstalldocs
if declare -p EXAMPLES &>/dev/null; then
+ [[ ${EAPI} != [45] ]] && die "EXAMPLES are banned in EAPI ${EAPI}"
+
local INSDESTTREE=/usr/share/doc/${PF}/examples
doins -r "${EXAMPLES[@]}"
docompress -x "${INSDESTTREE}"
--
2.6.3
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-dev] [PATCH 26/29] distutils-r1.eclass: Ban DISTUTILS_NO_PARALLEL_BUILD in EAPI 6
2015-11-22 19:50 [gentoo-dev] [PATCHES] Clean-up & EAPI 6 support for python-r1 suite Michał Górny
` (24 preceding siblings ...)
2015-11-22 19:51 ` [gentoo-dev] [PATCH 25/29] distutils-r1.eclass: Ban EXAMPLES " Michał Górny
@ 2015-11-22 19:51 ` Michał Górny
2015-11-22 19:51 ` [gentoo-dev] [PATCH 27/29] distutils-r1.eclass: Make default _all impl call warning fatal " Michał Górny
` (4 subsequent siblings)
30 siblings, 0 replies; 43+ messages in thread
From: Michał Górny @ 2015-11-22 19:51 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
---
eclass/distutils-r1.eclass | 2 ++
1 file changed, 2 insertions(+)
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index e55e2e4..6054f27 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -691,6 +691,8 @@ _distutils-r1_run_foreach_impl() {
debug-print-function ${FUNCNAME} "${@}"
if [[ ${DISTUTILS_NO_PARALLEL_BUILD} ]]; then
+ [[ ${EAPI} == [45] ]] || die "DISTUTILS_NO_PARALLEL_BUILD is banned in EAPI ${EAPI}"
+
eqawarn "DISTUTILS_NO_PARALLEL_BUILD is no longer meaningful. Now all builds"
eqawarn "are non-parallel. Please remove it from the ebuild."
--
2.6.3
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-dev] [PATCH 27/29] distutils-r1.eclass: Make default _all impl call warning fatal in EAPI 6
2015-11-22 19:50 [gentoo-dev] [PATCHES] Clean-up & EAPI 6 support for python-r1 suite Michał Górny
` (25 preceding siblings ...)
2015-11-22 19:51 ` [gentoo-dev] [PATCH 26/29] distutils-r1.eclass: Ban DISTUTILS_NO_PARALLEL_BUILD " Michał Górny
@ 2015-11-22 19:51 ` Michał Górny
2015-11-22 19:51 ` [gentoo-dev] [PATCH 28/29] distutils-r1.eclass: Remove unnecessary eutils inherit " Michał Górny
` (3 subsequent siblings)
30 siblings, 0 replies; 43+ messages in thread
From: Michał Górny @ 2015-11-22 19:51 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
---
eclass/distutils-r1.eclass | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 6054f27..1f0b74a 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -729,7 +729,10 @@ distutils-r1_src_prepare() {
fi
if [[ ! ${_DISTUTILS_DEFAULT_CALLED} ]]; then
- eqawarn "QA warning: python_prepare_all() didn't call distutils-r1_python_prepare_all"
+ local cmd=die
+ [[ ${EAPI} == [45] ]] && cmd=eqawarn
+
+ "${cmd}" "QA: python_prepare_all() didn't call distutils-r1_python_prepare_all"
fi
if declare -f python_prepare >/dev/null; then
@@ -800,7 +803,10 @@ distutils-r1_src_install() {
fi
if [[ ! ${_DISTUTILS_DEFAULT_CALLED} ]]; then
- eqawarn "QA warning: python_install_all() didn't call distutils-r1_python_install_all"
+ local cmd=die
+ [[ ${EAPI} == [45] ]] && cmd=eqawarn
+
+ "${cmd}" "QA: python_install_all() didn't call distutils-r1_python_install_all"
fi
}
--
2.6.3
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-dev] [PATCH 28/29] distutils-r1.eclass: Remove unnecessary eutils inherit in EAPI 6
2015-11-22 19:50 [gentoo-dev] [PATCHES] Clean-up & EAPI 6 support for python-r1 suite Michał Górny
` (26 preceding siblings ...)
2015-11-22 19:51 ` [gentoo-dev] [PATCH 27/29] distutils-r1.eclass: Make default _all impl call warning fatal " Michał Górny
@ 2015-11-22 19:51 ` Michał Górny
2015-11-22 19:51 ` [gentoo-dev] [PATCH 29/29] distutils-r1.eclass: Enable " Michał Górny
` (2 subsequent siblings)
30 siblings, 0 replies; 43+ messages in thread
From: Michał Górny @ 2015-11-22 19:51 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
---
eclass/distutils-r1.eclass | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 1f0b74a..7cb37c8 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -79,7 +79,8 @@ esac
if [[ ! ${_DISTUTILS_R1} ]]; then
-inherit eutils toolchain-funcs
+[[ ${EAPI} == [45] ]] && inherit eutils
+inherit toolchain-funcs
if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then
inherit multiprocessing python-r1
--
2.6.3
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-dev] [PATCH 29/29] distutils-r1.eclass: Enable EAPI 6
2015-11-22 19:50 [gentoo-dev] [PATCHES] Clean-up & EAPI 6 support for python-r1 suite Michał Górny
` (27 preceding siblings ...)
2015-11-22 19:51 ` [gentoo-dev] [PATCH 28/29] distutils-r1.eclass: Remove unnecessary eutils inherit " Michał Górny
@ 2015-11-22 19:51 ` Michał Górny
2015-11-26 22:30 ` [gentoo-dev] [PATCH 1/2] python-utils-r1.eclass: python_fix_shebang, skip empty files Michał Górny
2015-11-28 19:10 ` [gentoo-dev] [PATCHES] Clean-up & EAPI 6 support for python-r1 suite Michał Górny
30 siblings, 0 replies; 43+ messages in thread
From: Michał Górny @ 2015-11-22 19:51 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
---
eclass/distutils-r1.eclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
index 7cb37c8..a2356f4 100644
--- a/eclass/distutils-r1.eclass
+++ b/eclass/distutils-r1.eclass
@@ -47,7 +47,7 @@ case "${EAPI:-0}" in
0|1|2|3)
die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}"
;;
- 4|5)
+ 4|5|6)
;;
*)
die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}"
--
2.6.3
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-dev] [PATCH 1/2] python-utils-r1.eclass: python_fix_shebang, skip empty files
2015-11-22 19:50 [gentoo-dev] [PATCHES] Clean-up & EAPI 6 support for python-r1 suite Michał Górny
` (28 preceding siblings ...)
2015-11-22 19:51 ` [gentoo-dev] [PATCH 29/29] distutils-r1.eclass: Enable " Michał Górny
@ 2015-11-26 22:30 ` Michał Górny
2015-11-26 22:30 ` [gentoo-dev] [PATCH 2/2] python-utils-r1.eclass: python_fix_shebang, accept symlink as parameter Michał Górny
` (2 more replies)
2015-11-28 19:10 ` [gentoo-dev] [PATCHES] Clean-up & EAPI 6 support for python-r1 suite Michał Górny
30 siblings, 3 replies; 43+ messages in thread
From: Michał Górny @ 2015-11-26 22:30 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
Skip empty files when traversing directories in python_fix_shebangs.
This prevents read from failing on them, and avoids opening them
unnecessarily.
---
eclass/python-utils-r1.eclass | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 0a04e12..95689f6 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -1030,9 +1030,12 @@ python_fix_shebang() {
local path f
for path; do
- local any_correct any_fixed is_recursive
+ local any_correct any_fixed find_args is_recursive
- [[ -d ${path} ]] && is_recursive=1
+ if [[ -d ${path} ]]; then
+ is_recursive=1
+ find_args=( -size +0c )
+ fi
while IFS= read -r -d '' f; do
local shebang i
@@ -1128,7 +1131,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 "${find_args[@]}" -print0 || die)
if [[ ! ${any_fixed} ]]; then
eqawarn "QA warning: ${FUNCNAME}, ${path#${D}} did not match any fixable files."
--
2.6.3
^ permalink raw reply related [flat|nested] 43+ messages in thread
* [gentoo-dev] [PATCH 2/2] python-utils-r1.eclass: python_fix_shebang, accept symlink as parameter
2015-11-26 22:30 ` [gentoo-dev] [PATCH 1/2] python-utils-r1.eclass: python_fix_shebang, skip empty files Michał Górny
@ 2015-11-26 22:30 ` Michał Górny
2015-11-27 5:35 ` [gentoo-dev] [PATCH 1/2] python-utils-r1.eclass: python_fix_shebang, skip empty files Michał Górny
2015-11-27 13:15 ` Michał Górny
2 siblings, 0 replies; 43+ messages in thread
From: Michał Górny @ 2015-11-26 22:30 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
Add '-H' option to find to allow following symlinks passed as
parameters. This makes python_fix_shebang handle either file symlinks
passed directly, or directory symlinks passed directly for recursive
traversal. Both were currently ignored silently.
---
eclass/python-utils-r1.eclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 95689f6..84a2588 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -1131,7 +1131,7 @@ python_fix_shebang() {
eerror " requested impl: ${EPYTHON}"
die "${FUNCNAME}: conversion of incompatible shebang requested"
fi
- done < <(find "${path}" -type f "${find_args[@]}" -print0 || die)
+ done < <(find -H "${path}" -type f "${find_args[@]}" -print0 || die)
if [[ ! ${any_fixed} ]]; then
eqawarn "QA warning: ${FUNCNAME}, ${path#${D}} did not match any fixable files."
--
2.6.3
^ permalink raw reply related [flat|nested] 43+ messages in thread
* Re: [gentoo-dev] [PATCH 1/2] python-utils-r1.eclass: python_fix_shebang, skip empty files
2015-11-26 22:30 ` [gentoo-dev] [PATCH 1/2] python-utils-r1.eclass: python_fix_shebang, skip empty files Michał Górny
2015-11-26 22:30 ` [gentoo-dev] [PATCH 2/2] python-utils-r1.eclass: python_fix_shebang, accept symlink as parameter Michał Górny
@ 2015-11-27 5:35 ` Michał Górny
2015-11-27 13:15 ` Michał Górny
2 siblings, 0 replies; 43+ messages in thread
From: Michał Górny @ 2015-11-27 5:35 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 444 bytes --]
On Thu, 26 Nov 2015 23:30:08 +0100
Michał Górny <mgorny@gentoo.org> wrote:
> Skip empty files when traversing directories in python_fix_shebangs.
> This prevents read from failing on them, and avoids opening them
> unnecessarily.
Soo... this patch fixes failure with blueman but doesn't with
gnome-python-common-base. I'm going to debug that one later today.
--
Best regards,
Michał Górny
<http://dev.gentoo.org/~mgorny/>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 949 bytes --]
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [gentoo-dev] [PATCH 1/2] python-utils-r1.eclass: python_fix_shebang, skip empty files
2015-11-26 22:30 ` [gentoo-dev] [PATCH 1/2] python-utils-r1.eclass: python_fix_shebang, skip empty files Michał Górny
2015-11-26 22:30 ` [gentoo-dev] [PATCH 2/2] python-utils-r1.eclass: python_fix_shebang, accept symlink as parameter Michał Górny
2015-11-27 5:35 ` [gentoo-dev] [PATCH 1/2] python-utils-r1.eclass: python_fix_shebang, skip empty files Michał Górny
@ 2015-11-27 13:15 ` Michał Górny
2 siblings, 0 replies; 43+ messages in thread
From: Michał Górny @ 2015-11-27 13:15 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 574 bytes --]
On Thu, 26 Nov 2015 23:30:08 +0100
Michał Górny <mgorny@gentoo.org> wrote:
> Skip empty files when traversing directories in python_fix_shebangs.
> This prevents read from failing on them, and avoids opening them
> unnecessarily.
> ---
> eclass/python-utils-r1.eclass | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
I'm withdrawing this one. 'read' is equally unhappy with empty files
and files having no newline character (i.e. very ugly files), so no
||die for it.
--
Best regards,
Michał Górny
<http://dev.gentoo.org/~mgorny/>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 949 bytes --]
^ permalink raw reply [flat|nested] 43+ messages in thread
* Re: [gentoo-dev] [PATCHES] Clean-up & EAPI 6 support for python-r1 suite
2015-11-22 19:50 [gentoo-dev] [PATCHES] Clean-up & EAPI 6 support for python-r1 suite Michał Górny
` (29 preceding siblings ...)
2015-11-26 22:30 ` [gentoo-dev] [PATCH 1/2] python-utils-r1.eclass: python_fix_shebang, skip empty files Michał Górny
@ 2015-11-28 19:10 ` Michał Górny
30 siblings, 0 replies; 43+ messages in thread
From: Michał Górny @ 2015-11-28 19:10 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 344 bytes --]
On Sun, 22 Nov 2015 20:50:41 +0100
Michał Górny <mgorny@gentoo.org> wrote:
> Hi,
>
> Here's a large batch of patches to various python-r1 suite eclasses for
> initial review. They intend to clean up the eclasses and make them
> suitable for EAPI 6.
Merged.
--
Best regards,
Michał Górny
<http://dev.gentoo.org/~mgorny/>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 949 bytes --]
^ permalink raw reply [flat|nested] 43+ messages in thread