/[gentoo]/xml/htdocs/proj/en/glep/glep-0055.html
Gentoo

Diff of /xml/htdocs/proj/en/glep/glep-0055.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.1 Revision 1.2
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
5This HTML is auto-generated. DO NOT EDIT THIS FILE! If you are writing a new
6PEP, see http://www.python.org/peps/pep-0001.html for instructions and links
7to 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
82EAPI the package manager needs to source the ebuild, which itself needs the EAPI 78EAPI the package manager needs to source the ebuild, which itself needs the EAPI
83in the first place. Otherwise it imposes a serious limitation, namely every ebuild, 79in the first place. Otherwise it imposes a serious limitation, namely every ebuild,
84using any of the future EAPIs, will have to be source'able by old package 80using any of the future EAPIs, will have to be source'able by old package
85managers and hence there is no way to:</p> 81managers 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
89eclass functionality).</li> 85eclass 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
92suffix - GLEP54 <a class="footnote-reference" href="#glep54" id="id1" name="id1">[1]</a>.</li> 88suffix - 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
109allows package managers to trivially read the EAPI from the ebuild filename. It 105allows package managers to trivially read the EAPI from the ebuild filename. It
110is also backward compatible, because currently ebuilds are recognised by the 106is 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
112the package managers.</p> 108the 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.
141EAPI 0 is used.</p> 137EAPI 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.
170ebuild masked because of the unsupported pre-source EAPI.</p> 166ebuild 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=&quot;2&quot;</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=&quot;2&quot;</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
177package manager didn't die when sourcing the ebuild thinking that EAPI 0 173package manager didn't die when sourcing the ebuild thinking that EAPI 0
178is used). 174is used).
179ebuild masked because of the unsupported post-source EAPI.</p> 175ebuild 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
186category, package name, and version. Although it would have the advantage of 182category, package name, and version. Although it would have the advantage of
187allowing to provide backward compatible ebuilds, it would introduce problems 183allowing authors to provide backwards compatible ebuilds, it would introduce
188too. The first is the requirement to have strict EAPI ordering, the second is 184problems too. The first is the requirement to have strict EAPI ordering, the
189ensuring that all the ebuilds for a single category/package-version are 185second is ensuring that all the ebuilds for a single category/package-version
190equivalent, i.e. installing any of them has exactly the same effect to the 186are equivalent, i.e. installing any of them has exactly the same effect on a
191system.</p> 187given 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
196described above is only necessary to avoid undefined behaviour in corner cases 192described 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
212considered bash scripts and this would impose additional restrictions.</li> 208would 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>.
269Generated on: 2008-01-05 02:38 UTC. 265Generated on: 2008-01-06 02:39 UTC.
270Generated 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. 266Generated 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>

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.20