public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] RFC: fortran-2.eclass - Support for bin package system without compiler
@ 2013-07-18  7:07 Justin
  2013-07-18  7:12 ` Michał Górny
  0 siblings, 1 reply; 7+ messages in thread
From: Justin @ 2013-07-18  7:07 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1787 bytes --]

Hello,

I would like to add support for MERGE_TYPE=binary. Therefore I like to
deprecate EAPI < 4 on long term and use MERGE_TYPE now for EAPIs which
support it.

Thanks
Justin

Index: fortran-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/fortran-2.eclass,v
retrieving revision 1.18
diff -u -B -b -u -p -r1.18 fortran-2.eclass
--- fortran-2.eclass  18 Jul 2013 07:03:33 -0000  1.18
+++ fortran-2.eclass  18 Jul 2013 07:06:41 -0000
@@ -203,11 +203,11 @@ _fortran_test_function() {
   fi
 }

-# @FUNCTION: fortran-2_pkg_setup
+# @FUNCTION: _fortran-2_pkg_setup
+# @INTERNAL
 # @DESCRIPTION:
-# Setup functionallity,
-# checks for a valid fortran compiler and optionally for its openmp
support.
-fortran-2_pkg_setup() {
+# _The_ fortran-2_pkg_setup()
+_fortran-2_pkg_setup() {
   for _f_use in ${FORTRAN_NEEDED}; do
       case ${_f_use} in
           always)
@@ -229,6 +229,29 @@ fortran-2_pkg_setup() {
   done
 }

+
+# @FUNCTION: fortran-2_pkg_setup
+# @DESCRIPTION:
+# Setup functionallity,
+# checks for a valid fortran compiler and optionally for its openmp
support.
+fortran-2_pkg_setup() {
+ if [[ ${EAPI:-0} -lt 4 ]]; then
+     eqawarn "The fortran-2.eclass is going to deprecate support for"
+     eqawarn "EAPI < 4. Please migrate your package to a higher EAPI"
+     eqawarn "or file a bug at https://bugs.gentoo.org"
+ fi
+
+ case ${EAPI:-0} in
+     0|1|2|3)
+         _fortran-2_pkg_setup ;;
+     4|5)
+         if [[ ${MERGE_TYPE} != binary ]]; then
+             _fortran-2_pkg_setup
+         fi
+         ;;
+ esac
+}
+
 case ${EAPI:-0} in
   0|1|2|3|4|5) EXPORT_FUNCTIONS pkg_setup ;;
   *) die "EAPI=${EAPI} is not supported" ;;


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-dev] RFC: fortran-2.eclass - Support for bin package system without compiler
  2013-07-18  7:07 [gentoo-dev] RFC: fortran-2.eclass - Support for bin package system without compiler Justin
@ 2013-07-18  7:12 ` Michał Górny
  2013-07-18  7:28   ` Justin
  0 siblings, 1 reply; 7+ messages in thread
From: Michał Górny @ 2013-07-18  7:12 UTC (permalink / raw
  To: gentoo-dev; +Cc: jlec

[-- Attachment #1: Type: text/plain, Size: 2247 bytes --]

Dnia 2013-07-18, o godz. 09:07:22
Justin <jlec@gentoo.org> napisał(a):

> Index: fortran-2.eclass
> ===================================================================
> RCS file: /var/cvsroot/gentoo-x86/eclass/fortran-2.eclass,v
> retrieving revision 1.18
> diff -u -B -b -u -p -r1.18 fortran-2.eclass
> --- fortran-2.eclass  18 Jul 2013 07:03:33 -0000  1.18
> +++ fortran-2.eclass  18 Jul 2013 07:06:41 -0000
> @@ -203,11 +203,11 @@ _fortran_test_function() {
>    fi
>  }
> 
> -# @FUNCTION: fortran-2_pkg_setup
> +# @FUNCTION: _fortran-2_pkg_setup
> +# @INTERNAL
>  # @DESCRIPTION:
> -# Setup functionallity,
> -# checks for a valid fortran compiler and optionally for its openmp
> support.
> -fortran-2_pkg_setup() {
> +# _The_ fortran-2_pkg_setup()

Looks like useful comment ;P.

> +_fortran-2_pkg_setup() {
>    for _f_use in ${FORTRAN_NEEDED}; do
>        case ${_f_use} in
>            always)
> @@ -229,6 +229,29 @@ fortran-2_pkg_setup() {
>    done
>  }
> 
> +
> +# @FUNCTION: fortran-2_pkg_setup
> +# @DESCRIPTION:
> +# Setup functionallity,
> +# checks for a valid fortran compiler and optionally for its openmp
> support.
> +fortran-2_pkg_setup() {
> + if [[ ${EAPI:-0} -lt 4 ]]; then

Someone else's going to tell you this, so I'll tell you it first hand:
EAPI is not guaranteed to be a number and you shouldn't be using
numerical comparison against it.

Not that you support any non-numerical EAPI. But then some people who
fork eclasses in overlays will have to patch it more to support their
weird EAPIs. And I'm not pointing my finger at anyone in particular.

> +     eqawarn "The fortran-2.eclass is going to deprecate support for"
> +     eqawarn "EAPI < 4. Please migrate your package to a higher EAPI"
> +     eqawarn "or file a bug at https://bugs.gentoo.org"
> + fi
> +
> + case ${EAPI:-0} in
> +     0|1|2|3)
> +         _fortran-2_pkg_setup ;;
> +     4|5)
> +         if [[ ${MERGE_TYPE} != binary ]]; then
> +             _fortran-2_pkg_setup
> +         fi
> +         ;;
> + esac
> +}
> +
>  case ${EAPI:-0} in
>    0|1|2|3|4|5) EXPORT_FUNCTIONS pkg_setup ;;
>    *) die "EAPI=${EAPI} is not supported" ;;

-- 
Best regards,
Michał Górny

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 966 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-dev] RFC: fortran-2.eclass - Support for bin package system without compiler
  2013-07-18  7:12 ` Michał Górny
@ 2013-07-18  7:28   ` Justin
  2013-07-18  8:25     ` [gentoo-dev] " Duncan
  0 siblings, 1 reply; 7+ messages in thread
From: Justin @ 2013-07-18  7:28 UTC (permalink / raw
  To: Michał Górny; +Cc: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 2334 bytes --]

On 18/07/13 09:12, Michał Górny wrote:
>> +
>> +# @FUNCTION: fortran-2_pkg_setup
>> +# @DESCRIPTION:
>> +# Setup functionallity,
>> +# checks for a valid fortran compiler and optionally for its openmp
>> support.
>> +fortran-2_pkg_setup() {
>> + if [[ ${EAPI:-0} -lt 4 ]]; then
> 
> Someone else's going to tell you this, so I'll tell you it first hand:
> EAPI is not guaranteed to be a number and you shouldn't be using
> numerical comparison against it.
> 
> Not that you support any non-numerical EAPI. But then some people who
> fork eclasses in overlays will have to patch it more to support their
> weird EAPIs. And I'm not pointing my finger at anyone in particular.
> 

Doesn't matter to me who is doing crazy things. If I can support it
easily then I will do it.

Next try, which is removes one redundant check.

Thanks for the suggestion.

Index: fortran-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/fortran-2.eclass,v
retrieving revision 1.18
diff -u -B -b -u -p -r1.18 fortran-2.eclass
--- fortran-2.eclass  18 Jul 2013 07:03:33 -0000  1.18
+++ fortran-2.eclass  18 Jul 2013 07:28:12 -0000
@@ -203,11 +203,11 @@ _fortran_test_function() {
   fi
 }

-# @FUNCTION: fortran-2_pkg_setup
+# @FUNCTION: _fortran-2_pkg_setup
+# @INTERNAL
 # @DESCRIPTION:
-# Setup functionallity,
-# checks for a valid fortran compiler and optionally for its openmp
support.
-fortran-2_pkg_setup() {
+# _The_ fortran-2_pkg_setup()
+_fortran-2_pkg_setup() {
   for _f_use in ${FORTRAN_NEEDED}; do
       case ${_f_use} in
           always)
@@ -229,6 +229,26 @@ fortran-2_pkg_setup() {
   done
 }

+
+# @FUNCTION: fortran-2_pkg_setup
+# @DESCRIPTION:
+# Setup functionallity,
+# checks for a valid fortran compiler and optionally for its openmp
support.
+fortran-2_pkg_setup() {
+ case ${EAPI:-0} in
+     0|1|2|3)
+         eqawarn "The fortran-2.eclass is going to deprecate support for"
+         eqawarn "EAPI < 4. Please migrate your package to a higher EAPI"
+         eqawarn "or file a bug at https://bugs.gentoo.org"
+         _fortran-2_pkg_setup ;;
+     4|5)
+         if [[ ${MERGE_TYPE} != binary ]]; then
+             _fortran-2_pkg_setup
+         fi
+         ;;
+ esac
+}
+



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [gentoo-dev] Re: RFC: fortran-2.eclass - Support for bin package system without compiler
  2013-07-18  7:28   ` Justin
@ 2013-07-18  8:25     ` Duncan
  2013-07-18  8:44       ` Justin
  0 siblings, 1 reply; 7+ messages in thread
From: Duncan @ 2013-07-18  8:25 UTC (permalink / raw
  To: gentoo-dev

Justin posted on Thu, 18 Jul 2013 09:28:49 +0200 as excerpted:

> + case ${EAPI:-0} in
> +     0|1|2|3)
> +         eqawarn "The fortran-2.eclass is going to deprecate support

                                          ^^^^^^^^^^^

That reads strange to me.  Deprecated doesn't mean it no longer works; it 
means it's declared obsolete and recommended against but it still works 
for now, thus giving users a time to migrate.[1]

So "is going to deprecate" seems strange.  It should be "has deprecated", 
or rewording a bit more "support is deprecated for" or the like.  Because 
by the time someone's actually reading that output, the warning is 
already there; the deprecation has already happened.

Alternatively, keep the future tense and say "will be removed" or some 
such, or use a hybrid, "support is deprecated and will be removed".

---

[1] deprecate/deprecation online references:
http://en.wiktionary.org/wiki/deprecate
https://en.wikipedia.org/wiki/Deprecation
http://www.thefreedictionary.com/deprecate
http://www.google.com/search?q=define:deprecate

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-dev] Re: RFC: fortran-2.eclass - Support for bin package system without compiler
  2013-07-18  8:25     ` [gentoo-dev] " Duncan
@ 2013-07-18  8:44       ` Justin
  2013-07-18 15:39         ` Donnie Berkholz
  0 siblings, 1 reply; 7+ messages in thread
From: Justin @ 2013-07-18  8:44 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 2840 bytes --]

On 18/07/13 10:25, Duncan wrote:
> Justin posted on Thu, 18 Jul 2013 09:28:49 +0200 as excerpted:
> 
>> + case ${EAPI:-0} in
>> +     0|1|2|3)
>> +         eqawarn "The fortran-2.eclass is going to deprecate support
> 
>                                           ^^^^^^^^^^^
> 
> That reads strange to me.  Deprecated doesn't mean it no longer works; it 
> means it's declared obsolete and recommended against but it still works 
> for now, thus giving users a time to migrate.[1]
> 
> So "is going to deprecate" seems strange.  It should be "has deprecated", 
> or rewording a bit more "support is deprecated for" or the like.  Because 
> by the time someone's actually reading that output, the warning is 
> already there; the deprecation has already happened.
> 
> Alternatively, keep the future tense and say "will be removed" or some 
> such, or use a hybrid, "support is deprecated and will be removed".
> 
> ---
> 
> [1] deprecate/deprecation online references:
> http://en.wiktionary.org/wiki/deprecate
> https://en.wikipedia.org/wiki/Deprecation
> http://www.thefreedictionary.com/deprecate
> http://www.google.com/search?q=define:deprecate
> 
As long as there are only wording problems...



Index: fortran-2.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/fortran-2.eclass,v
retrieving revision 1.18
diff -u -B -b -u -p -r1.18 fortran-2.eclass
--- fortran-2.eclass  18 Jul 2013 07:03:33 -0000  1.18
+++ fortran-2.eclass  18 Jul 2013 08:42:56 -0000
@@ -203,11 +203,11 @@ _fortran_test_function() {
   fi
 }

-# @FUNCTION: fortran-2_pkg_setup
+# @FUNCTION: _fortran-2_pkg_setup
+# @INTERNAL
 # @DESCRIPTION:
-# Setup functionallity,
-# checks for a valid fortran compiler and optionally for its openmp
support.
-fortran-2_pkg_setup() {
+# _The_ fortran-2_pkg_setup()
+_fortran-2_pkg_setup() {
   for _f_use in ${FORTRAN_NEEDED}; do
       case ${_f_use} in
           always)
@@ -229,6 +229,27 @@ fortran-2_pkg_setup() {
   done
 }

+
+# @FUNCTION: fortran-2_pkg_setup
+# @DESCRIPTION:
+# Setup functionallity,
+# checks for a valid fortran compiler and optionally for its openmp
support.
+fortran-2_pkg_setup() {
+ case ${EAPI:-0} in
+     0|1|2|3)
+         eqawarn "Support for EAPI < 4 will be removed from the"
+         eqawarn "fortran-2.eclass in near future."
+         eqawarn "Please migrate your package to a higher EAPI"
+         eqawarn "or file a bug at https://bugs.gentoo.org"
+         _fortran-2_pkg_setup ;;
+     4|5)
+         if [[ ${MERGE_TYPE} != binary ]]; then
+             _fortran-2_pkg_setup
+         fi
+         ;;
+ esac
+}
+
 case ${EAPI:-0} in
   0|1|2|3|4|5) EXPORT_FUNCTIONS pkg_setup ;;
   *) die "EAPI=${EAPI} is not supported" ;;



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-dev] Re: RFC: fortran-2.eclass - Support for bin package system without compiler
  2013-07-18  8:44       ` Justin
@ 2013-07-18 15:39         ` Donnie Berkholz
  2013-07-18 15:50           ` Justin
  0 siblings, 1 reply; 7+ messages in thread
From: Donnie Berkholz @ 2013-07-18 15:39 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 828 bytes --]

On 10:44 Thu 18 Jul     , Justin wrote:
> +fortran-2_pkg_setup() {
> + case ${EAPI:-0} in
> +     0|1|2|3)
> +         eqawarn "Support for EAPI < 4 will be removed from the"
> +         eqawarn "fortran-2.eclass in near future."
> +         eqawarn "Please migrate your package to a higher EAPI"
> +         eqawarn "or file a bug at https://bugs.gentoo.org"
> +         _fortran-2_pkg_setup ;;

It's more useful if you provide a date here (30+ days from the commit) 
after which things are no longer guaranteed to work, versus "near 
future."

I didn't catch it in your original email — have you run a scan to see 
how many ebuilds are affected?

-- 
Thanks,
Donnie

Donnie Berkholz
Council Member / Sr. Developer, Gentoo Linux <http://dberkholz.com>
Analyst, RedMonk <http://redmonk.com/dberkholz/>

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-dev] Re: RFC: fortran-2.eclass - Support for bin package system without compiler
  2013-07-18 15:39         ` Donnie Berkholz
@ 2013-07-18 15:50           ` Justin
  0 siblings, 0 replies; 7+ messages in thread
From: Justin @ 2013-07-18 15:50 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1227 bytes --]

On 18/07/13 17:39, Donnie Berkholz wrote:
> On 10:44 Thu 18 Jul     , Justin wrote:
>> +fortran-2_pkg_setup() {
>> + case ${EAPI:-0} in
>> +     0|1|2|3)
>> +         eqawarn "Support for EAPI < 4 will be removed from the"
>> +         eqawarn "fortran-2.eclass in near future."
>> +         eqawarn "Please migrate your package to a higher EAPI"
>> +         eqawarn "or file a bug at https://bugs.gentoo.org"
>> +         _fortran-2_pkg_setup ;;
> 
> It's more useful if you provide a date here (30+ days from the commit) 
> after which things are no longer guaranteed to work, versus "near 
> future."
> 
> I didn't catch it in your original email — have you run a scan to see 
> how many ebuilds are affected?
> 

I did.

In absolute numbers there per EAPI following consumers

1: 2
2: 24
3: 32
4: 106
5: 71

but there are only 10 packages where there is no version with a
sufficient high EAPI?

Most if not all affected packages are under the control of sci, so that
I can easily manage the transition.

I think I will place the deadline 60 days ahead after committing.
Everybody who likes to see the immediate affect just need to bump the
packages to the correct EAPI?

Justin


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-07-18 15:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-18  7:07 [gentoo-dev] RFC: fortran-2.eclass - Support for bin package system without compiler Justin
2013-07-18  7:12 ` Michał Górny
2013-07-18  7:28   ` Justin
2013-07-18  8:25     ` [gentoo-dev] " Duncan
2013-07-18  8:44       ` Justin
2013-07-18 15:39         ` Donnie Berkholz
2013-07-18 15:50           ` Justin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox