Gentoo Archives: gentoo-dev

From: Daniel Campbell <zlg@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH 1/2] app-portage/eclass-manpages: Add @SUPPORTED_EAPIS tag for eclass
Date: Wed, 03 May 2017 21:34:42
Message-Id: d4b37e7b-a208-8df8-5e92-fbc8780856ff@gentoo.org
In Reply to: [gentoo-dev] [PATCH 1/2] app-portage/eclass-manpages: Add @SUPPORTED_EAPIS tag for eclass by "Michał Górny"
1 On 04/28/2017 07:06 AM, Michał Górny wrote:
2 > Add a @SUPPORTED_EAPIS tag that can be used to explicitly provide a list
3 > of EAPIs that are supported by the eclass. The main goal is to make it
4 > possible to extract this list with relative ease, for scripting
5 > purposes. It is not included explicitly in the manpages at the moment.
6 >
7 > The first use case is to make it possible to explicitly distinguish
8 > eclasses that do not support a specific EAPI from eclasses that are not
9 > used by any ebuilds using a specific EAPI. Therefore, it will make it
10 > possible to easily detect when we can deprecate old EAPIs from eclasses.
11 > ---
12 > app-portage/eclass-manpages/files/eclass-to-manpage.awk | 4 ++++
13 > 1 file changed, 4 insertions(+)
14 >
15 > diff --git a/app-portage/eclass-manpages/files/eclass-to-manpage.awk b/app-portage/eclass-manpages/files/eclass-to-manpage.awk
16 > index 0b65162c04ec..fe7e9c12d8f5 100644
17 > --- a/app-portage/eclass-manpages/files/eclass-to-manpage.awk
18 > +++ b/app-portage/eclass-manpages/files/eclass-to-manpage.awk
19 > @@ -18,6 +18,7 @@
20 > # <optional; description of how to report bugs;
21 > # default: tell people to use bugs.gentoo.org>
22 > # @VCSURL: <optional; url to vcs for this eclass; default: https://gitweb.gentoo.org/repo/gentoo.git/log/eclass/@ECLASS@>
23 > +# @SUPPORTED_EAPIS: <optional; space-separated list of EAPIs>
24 > # @BLURB: <required; short description>
25 > # @DESCRIPTION:
26 > # <optional; long description>
27 > @@ -147,6 +148,7 @@ function handle_eclass() {
28 > eclass = $3
29 > eclass_maintainer = ""
30 > eclass_author = ""
31 > + supported_eapis = ""
32 > blurb = ""
33 > desc = ""
34 > example = ""
35 > @@ -176,6 +178,8 @@ function handle_eclass() {
36 > reporting_bugs = eat_paragraph()
37 > if ($2 == "@VCSURL:")
38 > vcs_url = eat_line()
39 > + if ($2 == "@SUPPORTED_EAPIS:")
40 > + supported_eapis = eat_line()
41 > if ($2 == "@BLURB:")
42 > blurb = eat_line()
43 > if ($2 == "@DESCRIPTION:")
44 >
45
46 Looks like something eclass developers could really use. I say go for
47 it! I'm not sure what you're talking about regarding _ vs. -; do you
48 mean the variable name? I think _ makes a bit more sense there since we
49 use INSTALL_MASK, PYTHON_SINGLE_TARGET, or other variable names with
50 underscores. Using a hyphen would make it stick out from other similarly
51 structured variable names.
52
53 --
54 Daniel Campbell - Gentoo Developer
55 OpenPGP Key: 0x1EA055D6 @ hkp://keys.gnupg.net
56 fpr: AE03 9064 AE00 053C 270C 1DE4 6F7A 9091 1EA0 55D6

Attachments

File name MIME type
signature.asc application/pgp-signature