Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: vapier@g.o, tools-portage@g.o, "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH 1/2] app-portage/eclass-manpages: Add @SUPPORTED-EAPIS tag for eclass
Date: Fri, 28 Apr 2017 14:43:26
Message-Id: 20170428144311.18082-1-mgorny@gentoo.org
1 Add a @SUPPORTED-EAPIS tag that can be used to explicitly provide a list
2 of EAPIs that are supported by the eclass. The main goal is to make it
3 possible to extract this list with relative ease, for scripting
4 purposes. It is not included explicitly in the manpages at the moment.
5
6 The first use case is to make it possible to explicitly distinguish
7 eclasses that do not support a specific EAPI from eclasses that are not
8 used by any ebuilds using a specific EAPI. Therefore, it will make it
9 possible to easily detect when we can deprecate old EAPIs from eclasses.
10 ---
11 app-portage/eclass-manpages/files/eclass-to-manpage.awk | 4 ++++
12 1 file changed, 4 insertions(+)
13
14 diff --git a/app-portage/eclass-manpages/files/eclass-to-manpage.awk b/app-portage/eclass-manpages/files/eclass-to-manpage.awk
15 index 8ff9f71a2022..681a567af043 100644
16 --- a/app-portage/eclass-manpages/files/eclass-to-manpage.awk
17 +++ b/app-portage/eclass-manpages/files/eclass-to-manpage.awk
18 @@ -18,6 +18,7 @@
19 # <optional; description of how to report bugs;
20 # default: tell people to use bugs.gentoo.org>
21 # @VCSURL: <optional; url to vcs for this eclass; default: https://gitweb.gentoo.org/repo/gentoo.git/log/eclass/@ECLASS@>
22 +# @SUPPORTED-EAPIS: <optional; space-separated list of EAPIs>
23 # @BLURB: <required; short description>
24 # @DESCRIPTION:
25 # <optional; long description>
26 @@ -147,6 +148,7 @@ function handle_eclass() {
27 eclass = $3
28 eclass_maintainer = ""
29 eclass_author = ""
30 + supported_eapis = ""
31 blurb = ""
32 desc = ""
33 example = ""
34 @@ -176,6 +178,8 @@ function handle_eclass() {
35 reporting_bugs = eat_paragraph()
36 if ($2 == "@VCSURL:")
37 vcs_url = eat_line()
38 + if ($2 == "@SUPPORTED-EAPIS:")
39 + supported_eapis = eat_line()
40 if ($2 == "@BLURB:")
41 blurb = eat_line()
42 if ($2 == "@DESCRIPTION:")
43 --
44 2.13.0.rc1

Replies