public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH 1/2] app-portage/eclass-manpages: Add @SUPPORTED_EAPIS tag for eclass
@ 2017-04-28 14:06 Michał Górny
  2017-04-28 14:06 ` [gentoo-dev] [PATCH 2/2] python-r1.eclass: Declare @SUPPORTED_EAPIS (example) Michał Górny
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Michał Górny @ 2017-04-28 14:06 UTC (permalink / raw
  To: gentoo-dev; +Cc: vapier, tools-portage, Michał Górny

Add a @SUPPORTED_EAPIS tag that can be used to explicitly provide a list
of EAPIs that are supported by the eclass. The main goal is to make it
possible to extract this list with relative ease, for scripting
purposes. It is not included explicitly in the manpages at the moment.

The first use case is to make it possible to explicitly distinguish
eclasses that do not support a specific EAPI from eclasses that are not
used by any ebuilds using a specific EAPI. Therefore, it will make it
possible to easily detect when we can deprecate old EAPIs from eclasses.
---
 app-portage/eclass-manpages/files/eclass-to-manpage.awk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/app-portage/eclass-manpages/files/eclass-to-manpage.awk b/app-portage/eclass-manpages/files/eclass-to-manpage.awk
index 0b65162c04ec..fe7e9c12d8f5 100644
--- a/app-portage/eclass-manpages/files/eclass-to-manpage.awk
+++ b/app-portage/eclass-manpages/files/eclass-to-manpage.awk
@@ -18,6 +18,7 @@
 # <optional; description of how to report bugs;
 #  default: tell people to use bugs.gentoo.org>
 # @VCSURL: <optional; url to vcs for this eclass; default: https://gitweb.gentoo.org/repo/gentoo.git/log/eclass/@ECLASS@>
+# @SUPPORTED_EAPIS: <optional; space-separated list of EAPIs>
 # @BLURB: <required; short description>
 # @DESCRIPTION:
 # <optional; long description>
@@ -147,6 +148,7 @@ function handle_eclass() {
 	eclass = $3
 	eclass_maintainer = ""
 	eclass_author = ""
+	supported_eapis = ""
 	blurb = ""
 	desc = ""
 	example = ""
@@ -176,6 +178,8 @@ function handle_eclass() {
 		reporting_bugs = eat_paragraph()
 	if ($2 == "@VCSURL:")
 		vcs_url = eat_line()
+	if ($2 == "@SUPPORTED_EAPIS:")
+		supported_eapis = eat_line()
 	if ($2 == "@BLURB:")
 		blurb = eat_line()
 	if ($2 == "@DESCRIPTION:")
-- 
2.13.0.rc1



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

* [gentoo-dev] [PATCH 2/2] python-r1.eclass: Declare @SUPPORTED_EAPIS (example)
  2017-04-28 14:06 [gentoo-dev] [PATCH 1/2] app-portage/eclass-manpages: Add @SUPPORTED_EAPIS tag for eclass Michał Górny
@ 2017-04-28 14:06 ` Michał Górny
  2017-04-28 14:31 ` [gentoo-dev] [PATCH 1/2] app-portage/eclass-manpages: Add @SUPPORTED_EAPIS tag for eclass Michał Górny
  2017-05-03 21:34 ` Daniel Campbell
  2 siblings, 0 replies; 4+ messages in thread
From: Michał Górny @ 2017-04-28 14:06 UTC (permalink / raw
  To: gentoo-dev; +Cc: vapier, tools-portage, 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 df57cf1e1322..c8d025bcb13c 100644
--- a/eclass/python-r1.eclass
+++ b/eclass/python-r1.eclass
@@ -7,6 +7,7 @@
 # @AUTHOR:
 # Author: Michał Górny <mgorny@gentoo.org>
 # Based on work of: Krzysztof Pawlik <nelchael@gentoo.org>
+# @SUPPORTED_EAPIS: 5 6
 # @BLURB: A common, simple eclass for Python packages.
 # @DESCRIPTION:
 # A common eclass providing helper functions to build and install
-- 
2.13.0.rc1



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

* Re: [gentoo-dev] [PATCH 1/2] app-portage/eclass-manpages: Add @SUPPORTED_EAPIS tag for eclass
  2017-04-28 14:06 [gentoo-dev] [PATCH 1/2] app-portage/eclass-manpages: Add @SUPPORTED_EAPIS tag for eclass Michał Górny
  2017-04-28 14:06 ` [gentoo-dev] [PATCH 2/2] python-r1.eclass: Declare @SUPPORTED_EAPIS (example) Michał Górny
@ 2017-04-28 14:31 ` Michał Górny
  2017-05-03 21:34 ` Daniel Campbell
  2 siblings, 0 replies; 4+ messages in thread
From: Michał Górny @ 2017-04-28 14:31 UTC (permalink / raw
  To: gentoo-dev; +Cc: vapier, tools-portage

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

On pią, 2017-04-28 at 16:06 +0200, Michał Górny wrote:
> Add a @SUPPORTED_EAPIS tag that can be used to explicitly provide a list
> of EAPIs that are supported by the eclass. The main goal is to make it
> possible to extract this list with relative ease, for scripting
> purposes. It is not included explicitly in the manpages at the moment.
> 
> The first use case is to make it possible to explicitly distinguish
> eclasses that do not support a specific EAPI from eclasses that are not
> used by any ebuilds using a specific EAPI. Therefore, it will make it
> possible to easily detect when we can deprecate old EAPIs from eclasses.
> ---
>  app-portage/eclass-manpages/files/eclass-to-manpage.awk | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/app-portage/eclass-manpages/files/eclass-to-manpage.awk b/app-portage/eclass-manpages/files/eclass-to-manpage.awk
> index 0b65162c04ec..fe7e9c12d8f5 100644
> --- a/app-portage/eclass-manpages/files/eclass-to-manpage.awk
> +++ b/app-portage/eclass-manpages/files/eclass-to-manpage.awk
> @@ -18,6 +18,7 @@
>  # <optional; description of how to report bugs;
>  #  default: tell people to use bugs.gentoo.org>
>  # @VCSURL: <optional; url to vcs for this eclass; default: https://gitweb.gentoo.org/repo/gentoo.git/log/eclass/@ECLASS@>;
> +# @SUPPORTED_EAPIS: <optional; space-separated list of EAPIs>

Hmm, I'm going to resubmit this with '-' instead of '_'. The doc format
doesn't use either consistently, so there's really no point trying to
follow the worse option.

>  # @BLURB: <required; short description>
>  # @DESCRIPTION:
>  # <optional; long description>
> @@ -147,6 +148,7 @@ function handle_eclass() {
>  	eclass = $3
>  	eclass_maintainer = ""
>  	eclass_author = ""
> +	supported_eapis = ""
>  	blurb = ""
>  	desc = ""
>  	example = ""
> @@ -176,6 +178,8 @@ function handle_eclass() {
>  		reporting_bugs = eat_paragraph()
>  	if ($2 == "@VCSURL:")
>  		vcs_url = eat_line()
> +	if ($2 == "@SUPPORTED_EAPIS:")
> +		supported_eapis = eat_line()
>  	if ($2 == "@BLURB:")
>  		blurb = eat_line()
>  	if ($2 == "@DESCRIPTION:")

-- 
Best regards,
Michał Górny

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 963 bytes --]

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

* Re: [gentoo-dev] [PATCH 1/2] app-portage/eclass-manpages: Add @SUPPORTED_EAPIS tag for eclass
  2017-04-28 14:06 [gentoo-dev] [PATCH 1/2] app-portage/eclass-manpages: Add @SUPPORTED_EAPIS tag for eclass Michał Górny
  2017-04-28 14:06 ` [gentoo-dev] [PATCH 2/2] python-r1.eclass: Declare @SUPPORTED_EAPIS (example) Michał Górny
  2017-04-28 14:31 ` [gentoo-dev] [PATCH 1/2] app-portage/eclass-manpages: Add @SUPPORTED_EAPIS tag for eclass Michał Górny
@ 2017-05-03 21:34 ` Daniel Campbell
  2 siblings, 0 replies; 4+ messages in thread
From: Daniel Campbell @ 2017-05-03 21:34 UTC (permalink / raw
  To: gentoo-dev


[-- Attachment #1.1: Type: text/plain, Size: 2505 bytes --]

On 04/28/2017 07:06 AM, Michał Górny wrote:
> Add a @SUPPORTED_EAPIS tag that can be used to explicitly provide a list
> of EAPIs that are supported by the eclass. The main goal is to make it
> possible to extract this list with relative ease, for scripting
> purposes. It is not included explicitly in the manpages at the moment.
> 
> The first use case is to make it possible to explicitly distinguish
> eclasses that do not support a specific EAPI from eclasses that are not
> used by any ebuilds using a specific EAPI. Therefore, it will make it
> possible to easily detect when we can deprecate old EAPIs from eclasses.
> ---
>  app-portage/eclass-manpages/files/eclass-to-manpage.awk | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/app-portage/eclass-manpages/files/eclass-to-manpage.awk b/app-portage/eclass-manpages/files/eclass-to-manpage.awk
> index 0b65162c04ec..fe7e9c12d8f5 100644
> --- a/app-portage/eclass-manpages/files/eclass-to-manpage.awk
> +++ b/app-portage/eclass-manpages/files/eclass-to-manpage.awk
> @@ -18,6 +18,7 @@
>  # <optional; description of how to report bugs;
>  #  default: tell people to use bugs.gentoo.org>
>  # @VCSURL: <optional; url to vcs for this eclass; default: https://gitweb.gentoo.org/repo/gentoo.git/log/eclass/@ECLASS@>
> +# @SUPPORTED_EAPIS: <optional; space-separated list of EAPIs>
>  # @BLURB: <required; short description>
>  # @DESCRIPTION:
>  # <optional; long description>
> @@ -147,6 +148,7 @@ function handle_eclass() {
>  	eclass = $3
>  	eclass_maintainer = ""
>  	eclass_author = ""
> +	supported_eapis = ""
>  	blurb = ""
>  	desc = ""
>  	example = ""
> @@ -176,6 +178,8 @@ function handle_eclass() {
>  		reporting_bugs = eat_paragraph()
>  	if ($2 == "@VCSURL:")
>  		vcs_url = eat_line()
> +	if ($2 == "@SUPPORTED_EAPIS:")
> +		supported_eapis = eat_line()
>  	if ($2 == "@BLURB:")
>  		blurb = eat_line()
>  	if ($2 == "@DESCRIPTION:")
> 

Looks like something eclass developers could really use. I say go for
it! I'm not sure what you're talking about regarding _ vs. -; do you
mean the variable name? I think _ makes a bit more sense there since we
use INSTALL_MASK, PYTHON_SINGLE_TARGET, or other variable names with
underscores. Using a hyphen would make it stick out from other similarly
structured variable names.

-- 
Daniel Campbell - Gentoo Developer
OpenPGP Key: 0x1EA055D6 @ hkp://keys.gnupg.net
fpr: AE03 9064 AE00 053C 270C  1DE4 6F7A 9091 1EA0 55D6


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

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

end of thread, other threads:[~2017-05-03 21:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-28 14:06 [gentoo-dev] [PATCH 1/2] app-portage/eclass-manpages: Add @SUPPORTED_EAPIS tag for eclass Michał Górny
2017-04-28 14:06 ` [gentoo-dev] [PATCH 2/2] python-r1.eclass: Declare @SUPPORTED_EAPIS (example) Michał Górny
2017-04-28 14:31 ` [gentoo-dev] [PATCH 1/2] app-portage/eclass-manpages: Add @SUPPORTED_EAPIS tag for eclass Michał Górny
2017-05-03 21:34 ` Daniel Campbell

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