Re: [gentoo-dev] [PATCH 10/15] perl-module.eclass: Rename SRC_TEST to DIST_TEST in EAPI=6 and default to "do parallel"

2015-12-27 Thread Andreas K. Huettel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Am Samstag, 26. Dezember 2015, 12:53:20 schrieb Jeroen Roovers:
> On Fri, 11 Dec 2015 22:03:06 +0100
> 
> dilfri...@gentoo.org wrote:
> > From: "Andreas K. Huettel (dilfridge)" 
> > 
> > ---
> > 
> >  eclass/perl-module.eclass | 40
> > 
> > +++- 1 file changed, 23
> > insertions(+), 17 deletions(-)
> > 
> > diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass
> > index efcc47c..0d428d2 100644
> > --- a/eclass/perl-module.eclass
> > +++ b/eclass/perl-module.eclass
> > @@ -154,6 +154,8 @@ if [[ ${EAPI:-0} = 5 ]] ; then
> > 
> > 
SRC_URI="mirror://cpan/authors/id/${MODULE_AUTHOR:0:1}/${MODULE_AUTHOR
> > :0:2}/${MODULE_AUTHOR}/${MODULE_SECTION:
+${MODULE_SECTION}/}${MODULE_A
> > }"
> > 
> > [[ -z "${HOMEPAGE}" ]] && \
> > 
> > HOMEPAGE="http://search.cpan.org/dist/${MODULE_NAME}/";
> > 
> > +
> > +   SRC_TEST="skip"
> > 
> >  else
> >  
> > DIST_NAME=${DIST_NAME:-${PN}}
> > DIST_P=${DIST_NAME}-${DIST_VERSION:-${PV}}
> > 
> > @@ -168,7 +170,6 @@ else
> > 
> >  fi
> 
> You're disabling src_test() by default in any ebuild that happens to
> inherit perl-module. Everyone who wants a way around that has to set
> STUPID_VARIABLE now. Why?
> 

That's the current (EAPI=5) behaviour, which has been unchanged in perl-
module.eclass since before I joined Gentoo afaik... I'm not too enthusiastic 
about it. 

EAPI=6 behaviour is the reverse; testing is enabled unless the variable 
DIST_TEST is set (and the variable allows more finetuning).

- -- 
Andreas K. Huettel
Gentoo Linux developer (council, perl, libreoffice)
dilfri...@gentoo.org
http://www.akhuettel.de/
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCgAGBQJWf811AAoJEHRrah2soMK+qhcP/2jKg70ic2XcGvdJnnsk/yuD
EJwE1dxlsSWBrTd01E71hbBcujJfHQQwslKtumU1TZ/a5uAF6jpEJXuxWtz/vV9U
XvNJuCjFhnKndWJxL3AiygbLNqk+R7ddOS5B2Pm2q/EV8PdSpVDhOX7qrmWQWWvL
dXekoN0ALTo5q+G/AKXddC/H4cu63V2ES4tjcVoc7dTVnXkiPD9oRTRYyPA3lG44
LCwIx3wVBO61Bu24DqvUqume/6obRp+ort3feM/mlGGxiOyYKSnlSHcOvcEw5FSg
stcF5urVRueiBTk8hHJVHHVttxwLRwrEGWL5849DgK3WZp1JMDRSrWmin93S6ur2
YXIbpxCm73ZwSXBJA74kcAh/CN3MVZf60ZIi/z3GdZE4pJU4zYRVlmd5AOVz3V4n
G0cGruJ2qtlFqinOxrrkj6/EKE7N4cjTN70nUggHKu4ApID8sd783uIbizs9+1Zs
0ZCCnj9EO28nIRmJhr8UfawVK0hQvZ14gGN/90D07bC1GIZeMFnd1aePIRz/bABN
eeI3OhhPI+yIlMKkRryT2RMi9lthUH9kIe+wEL9QnyCEjFlZsOhhl/e+m3lutfsF
E/AQ6WwzCrVpkjn1xkdrpKlZqjlzPXuQJv8irO9H/9IvViGvzxhF/+RO3Y6Cr/d3
ZqpUljJsvlT1Ob8/om55
=bJFY
-END PGP SIGNATURE-



Re: [gentoo-dev] [PATCH 10/15] perl-module.eclass: Rename SRC_TEST to DIST_TEST in EAPI=6 and default to "do parallel"

2015-12-26 Thread Jeroen Roovers
On Fri, 11 Dec 2015 22:03:06 +0100
dilfri...@gentoo.org wrote:

> From: "Andreas K. Huettel (dilfridge)" 
> 
> ---
>  eclass/perl-module.eclass | 40
> +++- 1 file changed, 23
> insertions(+), 17 deletions(-)
> 
> diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass
> index efcc47c..0d428d2 100644
> --- a/eclass/perl-module.eclass
> +++ b/eclass/perl-module.eclass
> @@ -154,6 +154,8 @@ if [[ ${EAPI:-0} = 5 ]] ; then
>   
> SRC_URI="mirror://cpan/authors/id/${MODULE_AUTHOR:0:1}/${MODULE_AUTHOR:0:2}/${MODULE_AUTHOR}/${MODULE_SECTION:+${MODULE_SECTION}/}${MODULE_A}"
>   [[ -z "${HOMEPAGE}" ]] && \
>   HOMEPAGE="http://search.cpan.org/dist/${MODULE_NAME}/";
> +
> + SRC_TEST="skip"
>  else
>   DIST_NAME=${DIST_NAME:-${PN}}
>   DIST_P=${DIST_NAME}-${DIST_VERSION:-${PV}}
> @@ -168,7 +170,6 @@ else
>  fi

You're disabling src_test() by default in any ebuild that happens to
inherit perl-module. Everyone who wants a way around that has to set
STUPID_VARIABLE now. Why?


 jer



Re: [gentoo-dev] [PATCH 10/15] perl-module.eclass: Rename SRC_TEST to DIST_TEST in EAPI=6 and default to "do parallel"

2015-12-12 Thread Kent Fredric
On 13 December 2015 at 09:41, Andreas K. Huettel  wrote:
> Well. We had that idea already, and at some point something barfed, I dont
> remember the details anymore. Maybe someone else from the team knows.
>
> The problem is introducing too many variables that look like something
> *upstream* might use...
>
> (We in addition already had creative variable clashes with the kernel module
> build system in the past.)
>
> "Gentoo Perl" would lead to GPL_... as variable prefix, not really suitable.
> Kent suggested GPLX_... which I find horrible. GPERL_? GP_? ...


Yeah. There's a bit of a potential issue with using the PERL_ prefix
in that that prefix is heavily overloaded /in perl/ things, and `perl
-V` subsequently reports all ENV vars with a PERL prefix ( underscore
or not )

PERL_MOM=Yours perl -V  | grep MOM
PERL_MOM="Yours"

So using the PERL_ prefix increases our chances we'll pick something
that will collide, or will mislead somebody into thinking that we're
using an ENV var that Perl reacts magically to, where the ENV var is
purely Gentoo and Purely part of our private API ( At least, its
supposed to be private from the context of a perl interpreter )

If there was a way to mark those vars so they didn't get exported to
perl that would help, but it wouldn't reduce the "What does this do"
impression-confusion.

-- 
Kent

KENTNL - https://metacpan.org/author/KENTNL



Re: [gentoo-dev] [PATCH 10/15] perl-module.eclass: Rename SRC_TEST to DIST_TEST in EAPI=6 and default to "do parallel"

2015-12-12 Thread Andreas K. Huettel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Am Samstag, 12. Dezember 2015, 13:03:56 schrieb Michał Górny:
> Dnia 11 grudnia 2015 22:03:06 CET, dilfri...@gentoo.org napisał(a):
>
> >+# @ECLASS-VARIABLE: DIST_TEST
> >+# @DESCRIPTION:
> >+# (EAPI=6) Variable that controls if tests are run in the test phase
> >+# at all, and if yes under which conditions. Defaults to "do parallel"
> >+# In EAPI=5 the variable is called SRC_TEST and defaults to "skip".
> >+# All of the following have been tested to work:
> >+#  DIST_TEST="do parallel"
> >+#  DIST_TEST="parallel"
> >+#  DIST_TEST="parallel do"
> >+#  DIST_TEST=parallel
> >+#  DIST_TEST=skip
> 
> At this point, I'm starting to wonder why you aren't using PERL_ prefix...
> 

Well. We had that idea already, and at some point something barfed, I dont 
remember the details anymore. Maybe someone else from the team knows.

The problem is introducing too many variables that look like something 
*upstream* might use... 

(We in addition already had creative variable clashes with the kernel module 
build system in the past.)

"Gentoo Perl" would lead to GPL_... as variable prefix, not really suitable. 
Kent suggested GPLX_... which I find horrible. GPERL_? GP_? ...

- -- 

Andreas K. Huettel
Gentoo Linux developer 
dilfri...@gentoo.org
http://www.akhuettel.de/

-BEGIN PGP SIGNATURE-
Version: GnuPG v2.1

iQJ8BAEBCgBmBQJWbIaIXxSAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ0RkJDMzI0NjNBOTIwMDY5MTQ2NkMzNDBF
MTM4NkZEN0VGNEI1Nzc5AAoJEOE4b9fvS1d5QtkQAIjvMwj0y5qR4Qut9yeUNKik
sZ/IaIj2l86EoyQiAVg8Rtb73t5PIqwh73Q2f99i8HVogV/J9BYgbS+u2kWax4em
ZQAJquJyUcKEV4YvIq+saFmUJG3RKg9ArDPZeq52AWA5HXF10YokijSLzhvknNuR
JMpj2b/a+kqBcpt3ssuf+q8hDAa6h2xdZySU+luIEDSNpxRYp4/1FBjoKOKDw659
u7jmOQs6oVaefbhKzQgt4Uh8LPhY4RBRC0A+6bN8XRHAYVkR7Fa6B939Xq9B/3iD
n+NGy1LY0UIot2QYuwdvqu2o4beng4unuGixZcXmpTQs+Cv5lJZrdE3Caid4z4m6
K/+lkjxwuI3bdSD6EoHH2Ie1CdcNDL+FTPB5N1wowQkjG3Sbo2yp83EPR/X643Mp
PF+Wm5XrabQFRZanJIYAbtmdpauIyqt/sRbD9hJ6za9OPUNU7PDehSaJVWJz79ZH
A0Wcj5B51vJaGcYrFSD7qp1oKMSL0qbT04EvpVC6C05FohMJcLZ6Y+1FiwB12Q9R
szWlVUU/V/sqwD+hflUK5KADQvPe0bHG6XRivxzBaMusfarjFuobjNr0HrS5S0IE
YTiqc9/yHKh5Z3jwKIOZ+PQ5C3OgSDI44FKUTcllv/RSKeA8X8nYupvHE3PNEcMj
BFH1L8YqrqviwBBATppl
=KnIg
-END PGP SIGNATURE-



Re: [gentoo-dev] [PATCH 10/15] perl-module.eclass: Rename SRC_TEST to DIST_TEST in EAPI=6 and default to "do parallel"

2015-12-12 Thread Michał Górny


Dnia 11 grudnia 2015 22:03:06 CET, dilfri...@gentoo.org napisał(a):
>From: "Andreas K. Huettel (dilfridge)" 
>
>---
>eclass/perl-module.eclass | 40 +++-
> 1 file changed, 23 insertions(+), 17 deletions(-)
>
>diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass
>index efcc47c..0d428d2 100644
>--- a/eclass/perl-module.eclass
>+++ b/eclass/perl-module.eclass
>@@ -154,6 +154,8 @@ if [[ ${EAPI:-0} = 5 ]] ; then
>   
> SRC_URI="mirror://cpan/authors/id/${MODULE_AUTHOR:0:1}/${MODULE_AUTHOR:0:2}/${MODULE_AUTHOR}/${MODULE_SECTION:+${MODULE_SECTION}/}${MODULE_A}"
>   [[ -z "${HOMEPAGE}" ]] && \
>   HOMEPAGE="http://search.cpan.org/dist/${MODULE_NAME}/";
>+
>+  SRC_TEST="skip"
> else
>   DIST_NAME=${DIST_NAME:-${PN}}
>   DIST_P=${DIST_NAME}-${DIST_VERSION:-${PV}}
>@@ -168,7 +170,6 @@ else
> fi
> 
> SRC_PREP="no"
>-SRC_TEST="skip"
> PREFER_BUILDPL="yes"
> 
> pm_echovar=""
>@@ -315,6 +316,18 @@ perl-module_src_compile() {
>   fi
> }
> 
>+# @ECLASS-VARIABLE: DIST_TEST
>+# @DESCRIPTION:
>+# (EAPI=6) Variable that controls if tests are run in the test phase
>+# at all, and if yes under which conditions. Defaults to "do parallel"
>+# In EAPI=5 the variable is called SRC_TEST and defaults to "skip".
>+# All of the following have been tested to work:
>+#  DIST_TEST="do parallel"
>+#  DIST_TEST="parallel"
>+#  DIST_TEST="parallel do"
>+#  DIST_TEST=parallel
>+#  DIST_TEST=skip

At this point, I'm starting to wonder why you aren't using PERL_ prefix...

>+
> # @FUNCTION: perl-module_src-test
> # @USAGE: perl-module_src_test()
> # @DESCRIPTION:
>@@ -323,24 +336,17 @@ perl-module_src_compile() {
> #
> # If you want more verbose testing, set TEST_VERBOSE=1
> # in your bashrc | /etc/portage/make.conf | ENV
>-#
>-# or ebuild writers:
>-# If you wish to enable default tests w/ 'make test' ,
>-#
>-#  SRC_TEST="do"
>-#
>-# If you wish to have threads run in parallel ( using the users
>makeopts )
>-# all of the following have been tested to work.
>-#
>-#  SRC_TEST="do parallel"
>-#  SRC_TEST="parallel"
>-#  SRC_TEST="parallel do"
>-#  SRC_TEST=parallel
>-#
> perl-module_src_test() {
>   debug-print-function $FUNCNAME "$@"
>-  if has 'do' ${SRC_TEST} || has 'parallel' ${SRC_TEST} ; then
>-  if has "${TEST_VERBOSE:-0}" 0 && has 'parallel' ${SRC_TEST} ; 
>then
>+  local my_test_control
>+  if [[ ${EAPI:-0} = 5 ]] ; then
>+  my_test_control=${SRC_TEST}
>+  else
>+  my_test_control=${DIST_TEST:-do parallel}
>+  fi
>+
>+  if has 'do' ${my_test_control} || has 'parallel' ${my_test_control} ;
>then
>+  if has "${TEST_VERBOSE:-0}" 0 && has 'parallel' 
>${my_test_control} ;
>then
>   export HARNESS_OPTIONS=j$(makeopts_jobs)
>   einfo "Test::Harness Jobs=$(makeopts_jobs)"
>   fi

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.



[gentoo-dev] [PATCH 10/15] perl-module.eclass: Rename SRC_TEST to DIST_TEST in EAPI=6 and default to "do parallel"

2015-12-11 Thread dilfridge
From: "Andreas K. Huettel (dilfridge)" 

---
 eclass/perl-module.eclass | 40 +++-
 1 file changed, 23 insertions(+), 17 deletions(-)

diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass
index efcc47c..0d428d2 100644
--- a/eclass/perl-module.eclass
+++ b/eclass/perl-module.eclass
@@ -154,6 +154,8 @@ if [[ ${EAPI:-0} = 5 ]] ; then

SRC_URI="mirror://cpan/authors/id/${MODULE_AUTHOR:0:1}/${MODULE_AUTHOR:0:2}/${MODULE_AUTHOR}/${MODULE_SECTION:+${MODULE_SECTION}/}${MODULE_A}"
[[ -z "${HOMEPAGE}" ]] && \
HOMEPAGE="http://search.cpan.org/dist/${MODULE_NAME}/";
+
+   SRC_TEST="skip"
 else
DIST_NAME=${DIST_NAME:-${PN}}
DIST_P=${DIST_NAME}-${DIST_VERSION:-${PV}}
@@ -168,7 +170,6 @@ else
 fi
 
 SRC_PREP="no"
-SRC_TEST="skip"
 PREFER_BUILDPL="yes"
 
 pm_echovar=""
@@ -315,6 +316,18 @@ perl-module_src_compile() {
fi
 }
 
+# @ECLASS-VARIABLE: DIST_TEST
+# @DESCRIPTION:
+# (EAPI=6) Variable that controls if tests are run in the test phase
+# at all, and if yes under which conditions. Defaults to "do parallel"
+# In EAPI=5 the variable is called SRC_TEST and defaults to "skip".
+# All of the following have been tested to work:
+#  DIST_TEST="do parallel"
+#  DIST_TEST="parallel"
+#  DIST_TEST="parallel do"
+#  DIST_TEST=parallel
+#  DIST_TEST=skip
+
 # @FUNCTION: perl-module_src-test
 # @USAGE: perl-module_src_test()
 # @DESCRIPTION:
@@ -323,24 +336,17 @@ perl-module_src_compile() {
 #
 # If you want more verbose testing, set TEST_VERBOSE=1
 # in your bashrc | /etc/portage/make.conf | ENV
-#
-# or ebuild writers:
-# If you wish to enable default tests w/ 'make test' ,
-#
-#  SRC_TEST="do"
-#
-# If you wish to have threads run in parallel ( using the users makeopts )
-# all of the following have been tested to work.
-#
-#  SRC_TEST="do parallel"
-#  SRC_TEST="parallel"
-#  SRC_TEST="parallel do"
-#  SRC_TEST=parallel
-#
 perl-module_src_test() {
debug-print-function $FUNCNAME "$@"
-   if has 'do' ${SRC_TEST} || has 'parallel' ${SRC_TEST} ; then
-   if has "${TEST_VERBOSE:-0}" 0 && has 'parallel' ${SRC_TEST} ; 
then
+   local my_test_control
+   if [[ ${EAPI:-0} = 5 ]] ; then
+   my_test_control=${SRC_TEST}
+   else
+   my_test_control=${DIST_TEST:-do parallel}
+   fi
+
+   if has 'do' ${my_test_control} || has 'parallel' ${my_test_control} ; 
then
+   if has "${TEST_VERBOSE:-0}" 0 && has 'parallel' 
${my_test_control} ; then
export HARNESS_OPTIONS=j$(makeopts_jobs)
einfo "Test::Harness Jobs=$(makeopts_jobs)"
fi
-- 
2.6.3