Gentoo Archives: gentoo-pms

From: Ulrich Mueller <ulm@g.o>
To: gentoo-pms@l.g.o
Subject: [gentoo-pms] Re: Why do we have mandatory ebuild variables?
Date: Sat, 21 Jul 2012 20:12:20
Message-Id: 20491.3341.59567.423805@a1i15.kph.uni-mainz.de
In Reply to: [gentoo-pms] Why do we have mandatory ebuild variables? by Ulrich Mueller
1 >>>>> On Sun, 15 Jul 2012, Ulrich Mueller wrote:
2
3 > Could we loosen this requirement for the variables that are allowed to
4 > be empty (i.e. all except DESCRIPTION and SLOT), or would this cause
5 > any trouble with package managers? For EAPI 5, or retroactively?
6
7 No objections here, and only positive replies in gentoo-dev.
8 A patch is included below.
9
10 Ulrich
11
12
13 From 8505dd0cf7afd639e48bfe696148e6f820a853e7 Mon Sep 17 00:00:00 2001
14 From: =?UTF-8?q?Ulrich=20M=C3=BCller?= <ulm@g.o>
15 Date: Fri, 20 Jul 2012 23:12:24 +0200
16 Subject: [PATCH] Some ebuild-defined variables are optional.
17
18 Move HOMEPAGE, SRC_URI, LICENSE, KEYWORDS, and IUSE from the mandatory
19 to the optional variables list. Sort variables in canonical order.
20 ---
21 ebuild-vars.tex | 100 +++++++++++++++++++++++++++---------------------------
22 1 files changed, 50 insertions(+), 50 deletions(-)
23
24 diff --git a/ebuild-vars.tex b/ebuild-vars.tex
25 index 29b9dfa..ea4962b 100644
26 --- a/ebuild-vars.tex
27 +++ b/ebuild-vars.tex
28 @@ -23,76 +23,76 @@ All ebuilds must define at least the following variables:
29 \begin{description}
30 \item[DESCRIPTION] A short human-readable description of the package's purpose. May be defined by an
31 eclass. Must not be empty.
32 -\item[HOMEPAGE] The URI or URIs for a package's homepage, including protocols. May be defined by an
33 - eclass. See section~\ref{sec:dependencies} for full syntax.
34 -\item[IUSE] The \t{USE} flags used by the ebuild. Any eclass that works with \t{USE} flags
35 - must also set \t{IUSE}, listing only the variables used by that eclass. The package manager is
36 - responsible for merging these values. See section~\ref{sec:use-iuse-handling} for discussion on
37 - which values must be listed this variable.
38 -
39 - \featurelabel{iuse-defaults} In EAPIs shown in table~\ref{tab:iuse-defaults-table} as supporting
40 - \t{IUSE} defaults, any use flag name in \t{IUSE} may be prefixed by at most one of a plus or a
41 - minus sign. If such a prefix is present, the package manager may use it as a suggestion as to
42 - the default value of the use flag if no other configuration overrides it.
43 -\item[KEYWORDS] A whitespace separated list of keywords for the ebuild. Each token must be a
44 - valid keyword name, as per section~\ref{sec:keyword-names}. May include \t{-*}, which
45 - indicates that the package will only work on explicitly listed archs. May include \t{-arch},
46 - which indicates that the package will not work on the specified arch. May be empty, which
47 - indicates uncertain functionality on any architecture. May be defined in an eclass.
48 -\item[LICENSE] The package's license. Each text token must correspond to a tree ``licenses/'' entry
49 - (see section~\ref{sec:licenses-dir}). See section~\ref{sec:dependencies} for full syntax.
50 - May be defined by an eclass. \label{ebuild-var-LICENSE}
51 \item[SLOT] The package's slot. Must be a valid slot name, as per section~\ref{sec:slot-names}. May
52 be defined by an eclass. Must not be empty.
53 -\item[SRC\_URI] A list of source URIs for the package. Valid protocols are \t{http://},
54 - \t{https://}, \t{ftp://} and \t{mirror://} (see section~\ref{sec:thirdpartymirrors} for mirror
55 - behaviour). Fetch restricted packages may include URL parts consisting of just a filename.
56 - May be defined by an eclass. See section~\ref{sec:dependencies} for full syntax.
57 \end{description}
58
59 If any of these variables are undefined, or if any of these variables are set to invalid values,
60 the package manager's behaviour is undefined; ideally, an error in one ebuild should not prevent
61 operations upon other ebuilds or packages.
62
63 -\begin{centertable}{EAPIs supporting \t{IUSE} defaults} \label{tab:iuse-defaults-table}
64 - \begin{tabular}{ l l }
65 - \toprule
66 - \multicolumn{1}{c}{\textbf{EAPI}} &
67 - \multicolumn{1}{c}{\textbf{Supports \t{IUSE} defaults?}} \\
68 - \midrule
69 - \t{0} & No \\
70 - \t{1} & Yes \\
71 - \t{2} & Yes \\
72 - \t{3} & Yes \\
73 - \t{4} & Yes \\
74 - \bottomrule
75 - \end{tabular}
76 -\end{centertable}
77 -
78 \section{Optional Ebuild-defined Variables}
79
80 Ebuilds may define any of the following variables:
81
82 \begin{description}
83 -\item[DEPEND] See section~\ref{sec:dependencies}.
84 \item[EAPI] The EAPI. See below.
85 -\item[PDEPEND] See section~\ref{sec:dependencies}.
86 -\item[RDEPEND] See section~\ref{sec:dependencies}. For some EAPIs, \t{RDEPEND} has special behaviour
87 - for its value if unset and when used with an eclass. See section~\ref{sec:rdepend-depend} for
88 - details.
89 -\item[RESTRICT] Zero or more behaviour restrictions for this package. See section~\ref{sec:restrict}
90 - for value meanings and section~\ref{sec:dependencies} for full syntax.
91 -\item[PROPERTIES] \featurelabel{properties} Zero or more properties for this package. See
92 - section~\ref{sec:properties} for value meanings and section~\ref{sec:dependencies} for full
93 - syntax. For EAPIs listed in table~\ref{tab:optional-vars-table} as having optional support,
94 - ebuilds must not rely upon the package manager recognising or understanding this variable in
95 - any way.
96 +\item[HOMEPAGE] The URI or URIs for a package's homepage, including protocols.
97 + See section~\ref{sec:dependencies} for full syntax.
98 +\item[SRC\_URI] A list of source URIs for the package. Valid protocols are \t{http://},
99 + \t{https://}, \t{ftp://} and \t{mirror://} (see section~\ref{sec:thirdpartymirrors} for mirror
100 + behaviour). Fetch restricted packages may include URL parts consisting of just a filename.
101 + See section~\ref{sec:dependencies} for full syntax.
102 +\item[LICENSE] The package's license. Each text token must correspond to a tree ``licenses/'' entry
103 + (see section~\ref{sec:licenses-dir}). See section~\ref{sec:dependencies} for full syntax.
104 + \label{ebuild-var-LICENSE}
105 +\item[KEYWORDS] A whitespace separated list of keywords for the ebuild. Each token must be a valid
106 + keyword name, as per section~\ref{sec:keyword-names}. May include \t{-*}, which indicates that
107 + the package will only work on explicitly listed archs. May include \t{-arch}, which indicates
108 + that the package will not work on the specified arch. May be empty, which indicates uncertain
109 + functionality on any architecture.
110 +\item[IUSE] The \t{USE} flags used by the ebuild. Any eclass that works with \t{USE} flags must
111 + also set \t{IUSE}, listing only the variables used by that eclass. The package manager is
112 + responsible for merging these values. See section~\ref{sec:use-iuse-handling} for discussion on
113 + which values must be listed this variable.
114 +
115 + \featurelabel{iuse-defaults} In EAPIs shown in table~\ref{tab:iuse-defaults-table} as supporting
116 + \t{IUSE} defaults, any use flag name in \t{IUSE} may be prefixed by at most one of a plus or a
117 + minus sign. If such a prefix is present, the package manager may use it as a suggestion as to
118 + the default value of the use flag if no other configuration overrides it.
119 \item[REQUIRED\_USE] \featurelabel{required-use} Zero or more assertions that must be met by the
120 configuration of \t{USE} flags to be valid for this ebuild. See section~\ref{sec:required-use}
121 for description and section~\ref{sec:dependencies} for full syntax. Only in EAPIs listed in
122 table~\ref{tab:optional-vars-table} as supporting \t{REQUIRED\_USE}.
123 +\item[PROPERTIES] \featurelabel{properties} Zero or more properties for this package.
124 + See section~\ref{sec:properties} for value meanings and section~\ref{sec:dependencies} for full
125 + syntax. For EAPIs listed in table~\ref{tab:optional-vars-table} as having optional support,
126 + ebuilds must not rely upon the package manager recognising or understanding this variable in
127 + any way.
128 +\item[RESTRICT] Zero or more behaviour restrictions for this package. See section~\ref{sec:restrict}
129 + for value meanings and section~\ref{sec:dependencies} for full syntax.
130 +\item[DEPEND] See section~\ref{sec:dependencies}.
131 +\item[RDEPEND] See section~\ref{sec:dependencies}. For some EAPIs, \t{RDEPEND} has special behaviour
132 + for its value if unset and when used with an eclass. See section~\ref{sec:rdepend-depend} for
133 + details.
134 +\item[PDEPEND] See section~\ref{sec:dependencies}.
135 \end{description}
136
137 +\begin{centertable}{EAPIs supporting \t{IUSE} defaults} \label{tab:iuse-defaults-table}
138 + \begin{tabular}{ l l }
139 + \toprule
140 + \multicolumn{1}{c}{\textbf{EAPI}} &
141 + \multicolumn{1}{c}{\textbf{Supports \t{IUSE} defaults?}} \\
142 + \midrule
143 + \t{0} & No \\
144 + \t{1} & Yes \\
145 + \t{2} & Yes \\
146 + \t{3} & Yes \\
147 + \t{4} & Yes \\
148 + \bottomrule
149 + \end{tabular}
150 +\end{centertable}
151 +
152 \begin{centertable}{EAPIs supporting various ebuild-defined variables}
153 \label{tab:optional-vars-table}
154 \begin{tabular}{ l l l }
155 --
156 1.7.8.6