public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH 0/6] EAPI 7 eclass deprecations
@ 2018-03-06 17:25 Michał Górny
  2018-03-06 17:25 ` [gentoo-dev] [PATCH 1/6] eapi7-ver.eclass: Explicitly indicate that EAPI 7+ includes it Michał Górny
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Michał Górny @ 2018-03-06 17:25 UTC (permalink / raw
  To: gentoo-dev; +Cc: Michał Górny

Hi,

Here's a short batch of patches that explicitly update EAPI checks
for eclass that are going to be banned in EAPI 7, and add some verbose
deprecation notices whenever stuff was deprecated already.

--
Best regards,
Michał Górny

Michał Górny (6):
  eapi7-ver.eclass: Explicitly indicate that EAPI 7+ includes it
  epatch.eclass: Ban in EAPI 7 (in favor of eapply)
  epatch.eclass: Deprecate in EAPI 6
  ltprune.eclass: Ban discouraged eclass in EAPI 7
  ltprune.eclass: Deprecate it verbosely
  versionator.eclass: Ban in EAPI 7 (in favor of built-in funcs)

 eclass/eapi7-ver.eclass   |  2 +-
 eclass/epatch.eclass      | 17 ++++++++++++++++-
 eclass/ltprune.eclass     | 14 ++++++++++++++
 eclass/versionator.eclass |  7 +++++++
 4 files changed, 38 insertions(+), 2 deletions(-)

-- 
2.16.2



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

* [gentoo-dev] [PATCH 1/6] eapi7-ver.eclass: Explicitly indicate that EAPI 7+ includes it
  2018-03-06 17:25 [gentoo-dev] [PATCH 0/6] EAPI 7 eclass deprecations Michał Górny
@ 2018-03-06 17:25 ` Michał Górny
  2018-03-06 19:28   ` Michael Orlitzky
  2018-03-06 17:25 ` [gentoo-dev] [PATCH 2/6] epatch.eclass: Ban in EAPI 7 (in favor of eapply) Michał Górny
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Michał Górny @ 2018-03-06 17:25 UTC (permalink / raw
  To: gentoo-dev; +Cc: Michał Górny

---
 eclass/eapi7-ver.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eclass/eapi7-ver.eclass b/eclass/eapi7-ver.eclass
index 7eb070c68171..6117124a90a5 100644
--- a/eclass/eapi7-ver.eclass
+++ b/eclass/eapi7-ver.eclass
@@ -63,7 +63,7 @@ case ${EAPI:-0} in
 	6)
 		;;
 	*)
-		die "${ECLASS}: EAPI=${EAPI} unknown";;
+		die "${ECLASS}: EAPI=${EAPI} includes all functions from this eclass";;
 esac
 
 # @FUNCTION: _ver_parse_range
-- 
2.16.2



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

* [gentoo-dev] [PATCH 2/6] epatch.eclass: Ban in EAPI 7 (in favor of eapply)
  2018-03-06 17:25 [gentoo-dev] [PATCH 0/6] EAPI 7 eclass deprecations Michał Górny
  2018-03-06 17:25 ` [gentoo-dev] [PATCH 1/6] eapi7-ver.eclass: Explicitly indicate that EAPI 7+ includes it Michał Górny
@ 2018-03-06 17:25 ` Michał Górny
  2018-03-06 17:25 ` [gentoo-dev] [PATCH 3/6] epatch.eclass: Deprecate in EAPI 6 Michał Górny
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: Michał Górny @ 2018-03-06 17:25 UTC (permalink / raw
  To: gentoo-dev; +Cc: Michał Górny

---
 eclass/epatch.eclass | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/eclass/epatch.eclass b/eclass/epatch.eclass
index 905f68f8ef22..8e03478c26ce 100644
--- a/eclass/epatch.eclass
+++ b/eclass/epatch.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: epatch.eclass
@@ -11,6 +11,13 @@
 
 if [[ -z ${_EPATCH_ECLASS} ]]; then
 
+case ${EAPI:-0} in
+	0|1|2|3|4|5|6)
+		;;
+	*)
+		die "${ECLASS}: banned in EAPI=${EAPI}; use eapply* instead";;
+esac
+
 inherit estack
 
 # @VARIABLE: EPATCH_SOURCE
-- 
2.16.2



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

* [gentoo-dev] [PATCH 3/6] epatch.eclass: Deprecate in EAPI 6
  2018-03-06 17:25 [gentoo-dev] [PATCH 0/6] EAPI 7 eclass deprecations Michał Górny
  2018-03-06 17:25 ` [gentoo-dev] [PATCH 1/6] eapi7-ver.eclass: Explicitly indicate that EAPI 7+ includes it Michał Górny
  2018-03-06 17:25 ` [gentoo-dev] [PATCH 2/6] epatch.eclass: Ban in EAPI 7 (in favor of eapply) Michał Górny
@ 2018-03-06 17:25 ` Michał Górny
  2018-03-06 17:41   ` Ulrich Mueller
  2018-03-06 17:25 ` [gentoo-dev] [PATCH 4/6] ltprune.eclass: Ban discouraged eclass in EAPI 7 Michał Górny
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Michał Górny @ 2018-03-06 17:25 UTC (permalink / raw
  To: gentoo-dev; +Cc: Michał Górny

---
 eclass/epatch.eclass | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/eclass/epatch.eclass b/eclass/epatch.eclass
index 8e03478c26ce..e3178ff40020 100644
--- a/eclass/epatch.eclass
+++ b/eclass/epatch.eclass
@@ -12,7 +12,11 @@
 if [[ -z ${_EPATCH_ECLASS} ]]; then
 
 case ${EAPI:-0} in
-	0|1|2|3|4|5|6)
+	0|1|2|3|4|5)
+		;;
+	6)
+		# for eqawarn
+		[[ -z ${_EUTILS_ECLASS} ]] && inherit eutils
 		;;
 	*)
 		die "${ECLASS}: banned in EAPI=${EAPI}; use eapply* instead";;
@@ -103,6 +107,10 @@ EPATCH_FORCE="no"
 #
 # Refer to the other EPATCH_xxx variables for more customization of behavior.
 epatch() {
+	if [[ ${EAPI} == 6 ]]; then
+		eqawarn "epatch function is deprecated in EAPI ${EAPI}. Please use eapply instead."
+	fi
+
 	_epatch_draw_line() {
 		# create a line of same length as input string
 		[[ -z $1 ]] && set "$(printf "%65s" '')"
-- 
2.16.2



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

* [gentoo-dev] [PATCH 4/6] ltprune.eclass: Ban discouraged eclass in EAPI 7
  2018-03-06 17:25 [gentoo-dev] [PATCH 0/6] EAPI 7 eclass deprecations Michał Górny
                   ` (2 preceding siblings ...)
  2018-03-06 17:25 ` [gentoo-dev] [PATCH 3/6] epatch.eclass: Deprecate in EAPI 6 Michał Górny
@ 2018-03-06 17:25 ` Michał Górny
  2018-03-06 17:25 ` [gentoo-dev] [PATCH 5/6] ltprune.eclass: Deprecate it verbosely Michał Górny
  2018-03-06 17:25 ` [gentoo-dev] [PATCH 6/6] versionator.eclass: Ban in EAPI 7 (in favor of built-in funcs) Michał Górny
  5 siblings, 0 replies; 11+ messages in thread
From: Michał Górny @ 2018-03-06 17:25 UTC (permalink / raw
  To: gentoo-dev; +Cc: Michał Górny

---
 eclass/ltprune.eclass | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/eclass/ltprune.eclass b/eclass/ltprune.eclass
index 6b3e93921d96..a8bb4c842bc0 100644
--- a/eclass/ltprune.eclass
+++ b/eclass/ltprune.eclass
@@ -15,6 +15,13 @@
 
 if [[ -z ${_LTPRUNE_ECLASS} ]]; then
 
+case ${EAPI:-0} in
+	0|1|2|3|4|5|6)
+		;;
+	*)
+		die "${ECLASS}: banned in EAPI=${EAPI}; use 'find' instead";;
+esac
+
 inherit toolchain-funcs
 
 # @FUNCTION: prune_libtool_files
-- 
2.16.2



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

* [gentoo-dev] [PATCH 5/6] ltprune.eclass: Deprecate it verbosely
  2018-03-06 17:25 [gentoo-dev] [PATCH 0/6] EAPI 7 eclass deprecations Michał Górny
                   ` (3 preceding siblings ...)
  2018-03-06 17:25 ` [gentoo-dev] [PATCH 4/6] ltprune.eclass: Ban discouraged eclass in EAPI 7 Michał Górny
@ 2018-03-06 17:25 ` Michał Górny
  2018-03-06 17:25 ` [gentoo-dev] [PATCH 6/6] versionator.eclass: Ban in EAPI 7 (in favor of built-in funcs) Michał Górny
  5 siblings, 0 replies; 11+ messages in thread
From: Michał Górny @ 2018-03-06 17:25 UTC (permalink / raw
  To: gentoo-dev; +Cc: Michał Górny

---
 eclass/ltprune.eclass | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/eclass/ltprune.eclass b/eclass/ltprune.eclass
index a8bb4c842bc0..f1dd795aea2a 100644
--- a/eclass/ltprune.eclass
+++ b/eclass/ltprune.eclass
@@ -17,6 +17,8 @@ if [[ -z ${_LTPRUNE_ECLASS} ]]; then
 
 case ${EAPI:-0} in
 	0|1|2|3|4|5|6)
+		# for eqawarn
+		[[ -z ${_EUTILS_ECLASS} ]] && inherit eutils
 		;;
 	*)
 		die "${ECLASS}: banned in EAPI=${EAPI}; use 'find' instead";;
@@ -52,6 +54,11 @@ inherit toolchain-funcs
 prune_libtool_files() {
 	debug-print-function ${FUNCNAME} "$@"
 
+	eqawarn "prune_libtool_files is deprecated. Please use the following one-liner"
+	eqawarn "instead:"
+	eqawarn
+	eqawarn "  find "${D}" -name '*.la' -delete || die"
+
 	local removing_all removing_modules opt
 	for opt; do
 		case "${opt}" in
-- 
2.16.2



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

* [gentoo-dev] [PATCH 6/6] versionator.eclass: Ban in EAPI 7 (in favor of built-in funcs)
  2018-03-06 17:25 [gentoo-dev] [PATCH 0/6] EAPI 7 eclass deprecations Michał Górny
                   ` (4 preceding siblings ...)
  2018-03-06 17:25 ` [gentoo-dev] [PATCH 5/6] ltprune.eclass: Deprecate it verbosely Michał Górny
@ 2018-03-06 17:25 ` Michał Górny
  5 siblings, 0 replies; 11+ messages in thread
From: Michał Górny @ 2018-03-06 17:25 UTC (permalink / raw
  To: gentoo-dev; +Cc: Michał Górny

---
 eclass/versionator.eclass | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/eclass/versionator.eclass b/eclass/versionator.eclass
index 54d77a30b015..bf3f6a2a77b6 100644
--- a/eclass/versionator.eclass
+++ b/eclass/versionator.eclass
@@ -28,6 +28,13 @@
 if [[ -z ${_VERSIONATOR_ECLASS} ]]; then
 _VERSIONATOR_ECLASS=1
 
+case ${EAPI:-0} in
+	0|1|2|3|4|5|6)
+		;;
+	*)
+		die "${ECLASS}: banned in EAPI=${EAPI}; use ver_* instead";;
+esac
+
 inherit estack
 
 # @FUNCTION: get_all_version_components
-- 
2.16.2



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

* Re: [gentoo-dev] [PATCH 3/6] epatch.eclass: Deprecate in EAPI 6
  2018-03-06 17:25 ` [gentoo-dev] [PATCH 3/6] epatch.eclass: Deprecate in EAPI 6 Michał Górny
@ 2018-03-06 17:41   ` Ulrich Mueller
  2018-03-06 17:59     ` Michał Górny
  0 siblings, 1 reply; 11+ messages in thread
From: Ulrich Mueller @ 2018-03-06 17:41 UTC (permalink / raw
  To: gentoo-dev; +Cc: Michał Górny

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

>>>>> On Tue, 6 Mar 2018, Michał Górny wrote:

> +	6)
> +		# for eqawarn
> +		[[ -z ${_EUTILS_ECLASS} ]] && inherit eutils
>  		;;

NACK. With this you defeat the whole purpose of splitting things off
from eutils. In turn, eutils inherits a dozen of other eclasses in
EAPI 6. (Same for ltprune.eclass in patch 5/6.)

Also _EUTILS_ECLASS is an internal variable of eutils and should not
be accessed outside of it.

Ulrich

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

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

* Re: [gentoo-dev] [PATCH 3/6] epatch.eclass: Deprecate in EAPI 6
  2018-03-06 17:41   ` Ulrich Mueller
@ 2018-03-06 17:59     ` Michał Górny
  2018-03-06 18:07       ` Ulrich Mueller
  0 siblings, 1 reply; 11+ messages in thread
From: Michał Górny @ 2018-03-06 17:59 UTC (permalink / raw
  To: gentoo-dev

W dniu wto, 06.03.2018 o godzinie 18∶41 +0100, użytkownik Ulrich Mueller
napisał:
> > > > > > On Tue, 6 Mar 2018, Michał Górny wrote:
> > +	6)
> > +		# for eqawarn
> > +		[[ -z ${_EUTILS_ECLASS} ]] && inherit eutils
> >  		;;
> 
> NACK. With this you defeat the whole purpose of splitting things off
> from eutils. In turn, eutils inherits a dozen of other eclasses in
> EAPI 6. (Same for ltprune.eclass in patch 5/6.)

Yeah, you have a point there. Time to split eqawarn into its own eclass?
;-)

> Also _EUTILS_ECLASS is an internal variable of eutils and should not
> be accessed outside of it.
> 
> Ulrich

-- 
Best regards,
Michał Górny



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

* Re: [gentoo-dev] [PATCH 3/6] epatch.eclass: Deprecate in EAPI 6
  2018-03-06 17:59     ` Michał Górny
@ 2018-03-06 18:07       ` Ulrich Mueller
  0 siblings, 0 replies; 11+ messages in thread
From: Ulrich Mueller @ 2018-03-06 18:07 UTC (permalink / raw
  To: gentoo-dev

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

>>>>> On Tue, 06 Mar 2018, Michał Górny wrote:

> W dniu wto, 06.03.2018 o godzinie 18∶41 +0100, użytkownik Ulrich Mueller
> napisał:
>> > > > > > On Tue, 6 Mar 2018, Michał Górny wrote:
>> > +	6)
>> > +		# for eqawarn
>> > +		[[ -z ${_EUTILS_ECLASS} ]] && inherit eutils
>> >  		;;
>> 
>> NACK. With this you defeat the whole purpose of splitting things
>> off from eutils. In turn, eutils inherits a dozen of other eclasses
>> in EAPI 6. (Same for ltprune.eclass in patch 5/6.)

> Yeah, you have a point there. Time to split eqawarn into its own
> eclass? ;-)

One-line eclass? :)

No, I suggest to omit the deprecation part. With more than half of
the tree at EAPI 6 already, it would be pretty late for deprecation
warnings to be added for that EAPI. So simply do a clear-cut change
for EAPI 7.

Ulrich

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

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

* Re: [gentoo-dev] [PATCH 1/6] eapi7-ver.eclass: Explicitly indicate that EAPI 7+ includes it
  2018-03-06 17:25 ` [gentoo-dev] [PATCH 1/6] eapi7-ver.eclass: Explicitly indicate that EAPI 7+ includes it Michał Górny
@ 2018-03-06 19:28   ` Michael Orlitzky
  0 siblings, 0 replies; 11+ messages in thread
From: Michael Orlitzky @ 2018-03-06 19:28 UTC (permalink / raw
  To: gentoo-dev

On 03/06/2018 12:25 PM, Michał Górny wrote:
> ---
>  eclass/eapi7-ver.eclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/eclass/eapi7-ver.eclass b/eclass/eapi7-ver.eclass
> index 7eb070c68171..6117124a90a5 100644
> --- a/eclass/eapi7-ver.eclass
> +++ b/eclass/eapi7-ver.eclass
> @@ -63,7 +63,7 @@ case ${EAPI:-0} in
>  	6)
>  		;;
>  	*)
> -		die "${ECLASS}: EAPI=${EAPI} unknown";;
> +		die "${ECLASS}: EAPI=${EAPI} includes all functions from this eclass";;
>  esac
>  

That error message might be a lie; think exheres-0. I think you can put
the "6" case first, and then change the "0|1|2|3|4|5" case to "*" to
have all others die with "not supported".



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

end of thread, other threads:[~2018-03-06 19:29 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-06 17:25 [gentoo-dev] [PATCH 0/6] EAPI 7 eclass deprecations Michał Górny
2018-03-06 17:25 ` [gentoo-dev] [PATCH 1/6] eapi7-ver.eclass: Explicitly indicate that EAPI 7+ includes it Michał Górny
2018-03-06 19:28   ` Michael Orlitzky
2018-03-06 17:25 ` [gentoo-dev] [PATCH 2/6] epatch.eclass: Ban in EAPI 7 (in favor of eapply) Michał Górny
2018-03-06 17:25 ` [gentoo-dev] [PATCH 3/6] epatch.eclass: Deprecate in EAPI 6 Michał Górny
2018-03-06 17:41   ` Ulrich Mueller
2018-03-06 17:59     ` Michał Górny
2018-03-06 18:07       ` Ulrich Mueller
2018-03-06 17:25 ` [gentoo-dev] [PATCH 4/6] ltprune.eclass: Ban discouraged eclass in EAPI 7 Michał Górny
2018-03-06 17:25 ` [gentoo-dev] [PATCH 5/6] ltprune.eclass: Deprecate it verbosely Michał Górny
2018-03-06 17:25 ` [gentoo-dev] [PATCH 6/6] versionator.eclass: Ban in EAPI 7 (in favor of built-in funcs) Michał Górny

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