Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH eclass2manpage] Add @PROVIDES tag to indicate transitive eclass inheritance
Date: Sun, 29 Aug 2021 09:17:25
Message-Id: 20210829091709.256537-1-mgorny@gentoo.org
1 Add a @PROVIDES eclassdoc tag that can be used to indicate that
2 a particular eclass transitively provides the functions from another
3 eclass and therefore ebuilds inheriting it do not have to explicitly
4 inherit the other eclass.
5
6 For example, distutils-r1 provides python-r1/python-single-r1, and all
7 python*-r1 eclasse provide python-utils-r1.
8
9 This data will be used to drive pkgcheck checks for missing inherits.
10
11 Signed-off-by: Michał Górny <mgorny@g.o>
12 ---
13 eclass-to-manpage.awk | 7 +++++++
14 1 file changed, 7 insertions(+)
15
16 diff --git a/eclass-to-manpage.awk b/eclass-to-manpage.awk
17 index 1ffafd1..cde7c2b 100755
18 --- a/eclass-to-manpage.awk
19 +++ b/eclass-to-manpage.awk
20 @@ -174,6 +174,7 @@ function handle_eclass() {
21 eclass_maintainer = ""
22 eclass_author = ""
23 supported_eapis = ""
24 + provides = ""
25 blurb = ""
26 deprecated = ""
27 desc = ""
28 @@ -207,6 +208,8 @@ function handle_eclass() {
29 vcs_url = eat_line()
30 if ($2 == "@SUPPORTED_EAPIS:")
31 supported_eapis = eat_line()
32 + if ($2 == "@PROVIDES:")
33 + provides = eat_line()
34 if ($2 == "@BLURB:")
35 blurb = eat_line()
36 if ($2 == "@DEPRECATED:")
37 @@ -234,6 +237,10 @@ function handle_eclass() {
38 print ".SH \"SUPPORTED EAPIS\""
39 print man_text(supported_eapis)
40 }
41 + if (provides != "") {
42 + print ".SH \"TRANSITIVELY PROVIDED ECLASSES\""
43 + print man_text(provides)
44 + }
45 if (example != "") {
46 print ".SH \"EXAMPLE\""
47 print man_text(example)
48 --
49 2.33.0

Replies