| 1 | <?xml version="1.0" encoding="utf-8" ?> |
1 | <?xml version="1.0" encoding="utf-8" ?> |
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 3 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
3 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
| 4 | <!-- |
4 | |
| 5 | This HTML is auto-generated. DO NOT EDIT THIS FILE! If you are writing a new |
|
|
| 6 | PEP, see http://www.python.org/peps/pep-0001.html for instructions and links |
|
|
| 7 | to templates. DO NOT USE THIS HTML FILE AS YOUR TEMPLATE! |
|
|
| 8 | --> |
|
|
| 9 | <head> |
5 | <head> |
| 10 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
6 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| 11 | <meta name="generator" content="Docutils 0.4: http://docutils.sourceforge.net/" /> |
7 | <meta name="generator" content="Docutils 0.4: http://docutils.sourceforge.net/" /> |
| 12 | <title>GLEP 55 -- Use EAPI-suffixed ebuilds (.ebuild-EAPI)</title> |
8 | <title>GLEP 55 -- Use EAPI-suffixed ebuilds (.ebuild-EAPI)</title> |
| 13 | <link rel="stylesheet" href="tools/glep.css" type="text/css" /> |
9 | <link rel="stylesheet" href="tools/glep.css" type="text/css" /> |
| … | |
… | |
| 19 | <a href="http://www.gentoo.org/" title="Gentoo Linux Home Page"> |
15 | <a href="http://www.gentoo.org/" title="Gentoo Linux Home Page"> |
| 20 | <img src="http://www.gentoo.org/images/gentoo-new.gif" alt="[Gentoo]" |
16 | <img src="http://www.gentoo.org/images/gentoo-new.gif" alt="[Gentoo]" |
| 21 | border="0" width="150" height="35" /></a></td> |
17 | border="0" width="150" height="35" /></a></td> |
| 22 | <td class="textlinks" align="left"> |
18 | <td class="textlinks" align="left"> |
| 23 | [<b><a href="http://www.gentoo.org/">Gentoo Linux Home</a></b>] |
19 | [<b><a href="http://www.gentoo.org/">Gentoo Linux Home</a></b>] |
| 24 | [<b><a href="http://www.gentoo.org/peps">GLEP Index</a></b>] |
20 | [<b><a href="http://www.gentoo.org/proj/en/glep">GLEP Index</a></b>] |
| 25 | [<b><a href="http://www.gentoo.org/proj/en/glep/glep-0055.txt">GLEP Source</a></b>] |
21 | [<b><a href="http://www.gentoo.org/proj/en/glep/glep-0055.txt">GLEP Source</a></b>] |
| 26 | </td></tr></table> |
22 | </td></tr></table> |
| 27 | <table class="rfc2822 docutils field-list" frame="void" rules="none"> |
23 | <table class="rfc2822 docutils field-list" frame="void" rules="none"> |
| 28 | <col class="field-name" /> |
24 | <col class="field-name" /> |
| 29 | <col class="field-body" /> |
25 | <col class="field-body" /> |
| … | |
… | |
| 80 | <h1><a class="toc-backref" href="#id4" id="problem" name="problem">Problem</a></h1> |
76 | <h1><a class="toc-backref" href="#id4" id="problem" name="problem">Problem</a></h1> |
| 81 | <p>The current way of specifying the EAPI in ebuilds is flawed. In order to get the |
77 | <p>The current way of specifying the EAPI in ebuilds is flawed. In order to get the |
| 82 | EAPI the package manager needs to source the ebuild, which itself needs the EAPI |
78 | EAPI the package manager needs to source the ebuild, which itself needs the EAPI |
| 83 | in the first place. Otherwise it imposes a serious limitation, namely every ebuild, |
79 | in the first place. Otherwise it imposes a serious limitation, namely every ebuild, |
| 84 | using any of the future EAPIs, will have to be source'able by old package |
80 | using any of the future EAPIs, will have to be source'able by old package |
| 85 | managers and hence there is no way to:</p> |
81 | managers and hence there is no way to do any of the following:</p> |
| 86 | <blockquote> |
82 | <blockquote> |
| 87 | <ul class="simple"> |
83 | <ul class="simple"> |
| 88 | <li>Change behaviour of inherit in any way (for example, to extend or change |
84 | <li>Change the behaviour of inherit in any way (for example, to extend or change |
| 89 | eclass functionality).</li> |
85 | eclass functionality).</li> |
| 90 | <li>Add new global scope functions in any sane way.</li> |
86 | <li>Add new global scope functions in any sane way.</li> |
| 91 | <li>Extend versioning rules in an EAPI - for example, addition of the scm |
87 | <li>Extend versioning rules in an EAPI - for example, addition of the scm |
| 92 | suffix - GLEP54 <a class="footnote-reference" href="#glep54" id="id1" name="id1">[1]</a>.</li> |
88 | suffix - GLEP54 <a class="footnote-reference" href="#glep54" id="id1" name="id1">[1]</a>.</li> |
| 93 | </ul> |
89 | </ul> |
| … | |
… | |
| 105 | </div> |
101 | </div> |
| 106 | <div class="section"> |
102 | <div class="section"> |
| 107 | <h1><a class="toc-backref" href="#id6" id="proposed-solution" name="proposed-solution">Proposed solution</a></h1> |
103 | <h1><a class="toc-backref" href="#id6" id="proposed-solution" name="proposed-solution">Proposed solution</a></h1> |
| 108 | <p>The proposed solution is to use EAPI-suffixed file extensions for ebuilds. This |
104 | <p>The proposed solution is to use EAPI-suffixed file extensions for ebuilds. This |
| 109 | allows package managers to trivially read the EAPI from the ebuild filename. It |
105 | allows package managers to trivially read the EAPI from the ebuild filename. It |
| 110 | is also backward compatible, because currently ebuilds are recognised by the |
106 | is also backwards compatible, because currently ebuilds are recognised by the |
| 111 | <tt class="docutils literal"><span class="pre">.ebuild</span></tt> file extension and hence EAPI-suffixed ebuilds are simply ignored by |
107 | <tt class="docutils literal"><span class="pre">.ebuild</span></tt> file extension and hence EAPI-suffixed ebuilds are simply ignored by |
| 112 | the package managers.</p> |
108 | the package managers.</p> |
| 113 | </div> |
109 | </div> |
| 114 | <div class="section"> |
110 | <div class="section"> |
| 115 | <h1><a class="toc-backref" href="#id7" id="specification" name="specification">Specification</a></h1> |
111 | <h1><a class="toc-backref" href="#id7" id="specification" name="specification">Specification</a></h1> |
| … | |
… | |
| 135 | <p>Examples:</p> |
131 | <p>Examples:</p> |
| 136 | <blockquote> |
132 | <blockquote> |
| 137 | <ul> |
133 | <ul> |
| 138 | <li><dl class="first docutils"> |
134 | <li><dl class="first docutils"> |
| 139 | <dt><tt class="docutils literal"><span class="pre">pkg-1.ebuild</span></tt>, no EAPI set inside the ebuild</dt> |
135 | <dt><tt class="docutils literal"><span class="pre">pkg-1.ebuild</span></tt>, no EAPI set inside the ebuild</dt> |
| 140 | <dd><p class="first last">pre-source EAPI defaults 0, post-source EAPI defaults to pre-source EAPI. |
136 | <dd><p class="first last">pre-source EAPI defaults to 0, post-source EAPI defaults to pre-source EAPI. |
| 141 | EAPI 0 is used.</p> |
137 | EAPI 0 is used.</p> |
| 142 | </dd> |
138 | </dd> |
| 143 | </dl> |
139 | </dl> |
| 144 | </li> |
140 | </li> |
| 145 | <li><dl class="first docutils"> |
141 | <li><dl class="first docutils"> |
| … | |
… | |
| 165 | </dl> |
161 | </dl> |
| 166 | </li> |
162 | </li> |
| 167 | <li><dl class="first docutils"> |
163 | <li><dl class="first docutils"> |
| 168 | <dt><tt class="docutils literal"><span class="pre">pkg-5.ebuild-2</span></tt>, no EAPI set inside the ebuild, package manager not supporting EAPI 2</dt> |
164 | <dt><tt class="docutils literal"><span class="pre">pkg-5.ebuild-2</span></tt>, no EAPI set inside the ebuild, package manager not supporting EAPI 2</dt> |
| 169 | <dd><p class="first last">pre-source EAPI is 2, post-source EAPI is never checked. |
165 | <dd><p class="first last">pre-source EAPI is 2, post-source EAPI is never checked. |
| 170 | ebuild masked because of the unsupported pre-source EAPI.</p> |
166 | ebuild is masked because of the unsupported pre-source EAPI.</p> |
| 171 | </dd> |
167 | </dd> |
| 172 | </dl> |
168 | </dl> |
| 173 | </li> |
169 | </li> |
| 174 | <li><dl class="first docutils"> |
170 | <li><dl class="first docutils"> |
| 175 | <dt><tt class="docutils literal"><span class="pre">pkg-6.ebuild</span></tt>, <tt class="docutils literal"><span class="pre">EAPI="2"</span></tt>, package manager not supporting EAPI 2</dt> |
171 | <dt><tt class="docutils literal"><span class="pre">pkg-6.ebuild</span></tt>, <tt class="docutils literal"><span class="pre">EAPI="2"</span></tt>, package manager not supporting EAPI 2</dt> |
| 176 | <dd><p class="first last">pre-source EAPI defaults to 0, post-source EAPI is 2 (assuming the |
172 | <dd><p class="first last">pre-source EAPI defaults to 0, post-source EAPI is 2 (assuming the |
| 177 | package manager didn't die when sourcing the ebuild thinking that EAPI 0 |
173 | package manager didn't die when sourcing the ebuild thinking that EAPI 0 |
| 178 | is used). |
174 | is used). |
| 179 | ebuild masked because of the unsupported post-source EAPI.</p> |
175 | ebuild is masked because of the unsupported post-source EAPI.</p> |
| 180 | </dd> |
176 | </dd> |
| 181 | </dl> |
177 | </dl> |
| 182 | </li> |
178 | </li> |
| 183 | </ul> |
179 | </ul> |
| 184 | </blockquote> |
180 | </blockquote> |
| 185 | <p>Note that it is still not permitted to have more than one ebuild with equal |
181 | <p>Note that it is still not permitted to have more than one ebuild with equal |
| 186 | category, package name, and version. Although it would have the advantage of |
182 | category, package name, and version. Although it would have the advantage of |
| 187 | allowing to provide backward compatible ebuilds, it would introduce problems |
183 | allowing authors to provide backwards compatible ebuilds, it would introduce |
| 188 | too. The first is the requirement to have strict EAPI ordering, the second is |
184 | problems too. The first is the requirement to have strict EAPI ordering, the |
| 189 | ensuring that all the ebuilds for a single category/package-version are |
185 | second is ensuring that all the ebuilds for a single category/package-version |
| 190 | equivalent, i.e. installing any of them has exactly the same effect to the |
186 | are equivalent, i.e. installing any of them has exactly the same effect on a |
| 191 | system.</p> |
187 | given system.</p> |
| 192 | </div> |
188 | </div> |
| 193 | <div class="section"> |
189 | <div class="section"> |
| 194 | <h1><a class="toc-backref" href="#id8" id="application" name="application">Application</a></h1> |
190 | <h1><a class="toc-backref" href="#id8" id="application" name="application">Application</a></h1> |
| 195 | <p>Note that the developers should only set the pre-source EAPI. The process |
191 | <p>Note that the developers should only set the pre-source EAPI. The process |
| 196 | described above is only necessary to avoid undefined behaviour in corner cases |
192 | described above is only necessary to avoid undefined behaviour in corner cases |
| … | |
… | |
| 206 | <li><dl class="first docutils"> |
202 | <li><dl class="first docutils"> |
| 207 | <dt>Set the EAPI inside the ebuild in a way that makes it easy to fetch it</dt> |
203 | <dt>Set the EAPI inside the ebuild in a way that makes it easy to fetch it</dt> |
| 208 | <dd><ul class="first last simple"> |
204 | <dd><ul class="first last simple"> |
| 209 | <li>Doesn't meet the backward compatibility requirement.</li> |
205 | <li>Doesn't meet the backward compatibility requirement.</li> |
| 210 | <li>Isn't forward compatible either.</li> |
206 | <li>Isn't forward compatible either.</li> |
| 211 | <li>Could be confusing as ebuilds, and not without a reason, are |
207 | <li>Could be confusing as ebuilds are considered bash scripts and this |
| 212 | considered bash scripts and this would impose additional restrictions.</li> |
208 | would impose additional restrictions on the ebuild format.</li> |
| 213 | </ul> |
209 | </ul> |
| 214 | </dd> |
210 | </dd> |
| 215 | </dl> |
211 | </dl> |
| 216 | </li> |
212 | </li> |
| 217 | <li><dl class="first docutils"> |
213 | <li><dl class="first docutils"> |
| … | |
… | |
| 264 | |
260 | |
| 265 | </div> |
261 | </div> |
| 266 | <div class="footer"> |
262 | <div class="footer"> |
| 267 | <hr class="footer" /> |
263 | <hr class="footer" /> |
| 268 | <a class="reference" href="glep-0055.txt">View document source</a>. |
264 | <a class="reference" href="glep-0055.txt">View document source</a>. |
| 269 | Generated on: 2008-01-05 02:38 UTC. |
265 | Generated on: 2008-01-06 02:39 UTC. |
| 270 | Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source. |
266 | Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source. |
| 271 | |
267 | |
| 272 | </div> |
268 | </div> |
| 273 | </body> |
269 | </body> |
| 274 | </html> |
270 | </html> |