/[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.3 Revision 1.4
9 <style type="text/css"> 9 <style type="text/css">
10 10
11/* 11/*
12:Author: David Goodger 12:Author: David Goodger
13:Contact: goodger@users.sourceforge.net 13:Contact: goodger@users.sourceforge.net
14:date: $Date: 2009/05/17 15:50:27 $ 14:date: $Date: 2009/05/17 17:00:30 $
15:version: $Revision: 1.3 $ 15:version: $Revision: 1.4 $
16:copyright: This stylesheet has been placed in the public domain. 16:copyright: This stylesheet has been placed in the public domain.
17 17
18Default cascading style sheet for the PEP HTML output of Docutils. 18Default cascading style sheet for the PEP HTML output of Docutils.
19*/ 19*/
20 20
268<tbody valign="top"> 268<tbody valign="top">
269<tr class="field"><th class="field-name">GLEP:</th><td class="field-body">55</td> 269<tr class="field"><th class="field-name">GLEP:</th><td class="field-body">55</td>
270</tr> 270</tr>
271<tr class="field"><th class="field-name">Title:</th><td class="field-body">Use EAPI-suffixed ebuilds (.ebuild-EAPI)</td> 271<tr class="field"><th class="field-name">Title:</th><td class="field-body">Use EAPI-suffixed ebuilds (.ebuild-EAPI)</td>
272</tr> 272</tr>
273<tr class="field"><th class="field-name">Version:</th><td class="field-body">1.2</td> 273<tr class="field"><th class="field-name">Version:</th><td class="field-body">1.3</td>
274</tr> 274</tr>
275<tr class="field"><th class="field-name">Last-Modified:</th><td class="field-body"><a class="reference external" href="http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/proj/en/glep/glep-0055.txt?cvsroot=gentoo">2008/01/06 02:39:42</a></td> 275<tr class="field"><th class="field-name">Last-Modified:</th><td class="field-body"><a class="reference external" href="http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/proj/en/glep/glep-0055.txt?cvsroot=gentoo">2009/05/17 15:50:27</a></td>
276</tr> 276</tr>
277<tr class="field"><th class="field-name">Author:</th><td class="field-body">Piotr Jaroszyński &lt;peper&#32;&#97;t&#32;gentoo.org&gt;</td> 277<tr class="field"><th class="field-name">Author:</th><td class="field-body">Piotr Jaroszyński &lt;peper&#32;&#97;t&#32;gentoo.org&gt;</td>
278</tr> 278</tr>
279<tr class="field"><th class="field-name">Status:</th><td class="field-body">Draft</td> 279<tr class="field"><th class="field-name">Status:</th><td class="field-body">Draft</td>
280</tr> 280</tr>
296<li><a class="reference internal" href="#problem" id="id4">Problem</a></li> 296<li><a class="reference internal" href="#problem" id="id4">Problem</a></li>
297<li><a class="reference internal" href="#current-behaviour" id="id5">Current behaviour</a><ul> 297<li><a class="reference internal" href="#current-behaviour" id="id5">Current behaviour</a><ul>
298<li><a class="reference internal" href="#incompatible-change-of-inherit-e-g-make-it-look-in-the-package-dir-too" id="id6">Incompatible change of inherit (e.g. make it look in the package dir too)</a></li> 298<li><a class="reference internal" href="#incompatible-change-of-inherit-e-g-make-it-look-in-the-package-dir-too" id="id6">Incompatible change of inherit (e.g. make it look in the package dir too)</a></li>
299<li><a class="reference internal" href="#new-global-scope-function" id="id7">New global scope function</a></li> 299<li><a class="reference internal" href="#new-global-scope-function" id="id7">New global scope function</a></li>
300<li><a class="reference internal" href="#new-version-format" id="id8">New version format</a></li> 300<li><a class="reference internal" href="#new-version-format" id="id8">New version format</a></li>
301<li><a class="reference internal" href="#use-newer-bash-features" id="id9">Use newer bash features</a></li>
301</ul> 302</ul>
302</li> 303</li>
303<li><a class="reference internal" href="#abstract-solution" id="id9">Abstract solution</a></li> 304<li><a class="reference internal" href="#abstract-solution" id="id10">Abstract solution</a></li>
304<li><a class="reference internal" href="#proposed-solution" id="id10">Proposed solution</a></li> 305<li><a class="reference internal" href="#proposed-solution" id="id11">Proposed solution</a></li>
305<li><a class="reference internal" href="#specification" id="id11">Specification</a></li> 306<li><a class="reference internal" href="#specification" id="id12">Specification</a></li>
306<li><a class="reference internal" href="#summary-of-ideas" id="id12">Summary of ideas</a><ul> 307<li><a class="reference internal" href="#summary-of-ideas" id="id13">Summary of ideas</a><ul>
307<li><a class="reference internal" href="#eapi-suffixed-ebuilds-proposed-solution" id="id13">EAPI-suffixed ebuilds (proposed solution)</a></li> 308<li><a class="reference internal" href="#eapi-suffixed-ebuilds-proposed-solution" id="id14">EAPI-suffixed ebuilds (proposed solution)</a></li>
308<li><a class="reference internal" href="#eapi-in-the-filename-with-one-time-extension-change" id="id14">EAPI in the filename with one-time extension change</a></li> 309<li><a class="reference internal" href="#eapi-in-the-filename-with-one-time-extension-change" id="id15">EAPI in the filename with one-time extension change</a></li>
309<li><a class="reference internal" href="#easily-fetchable-eapi-inside-the-ebuild" id="id15">Easily fetchable EAPI inside the ebuild</a></li> 310<li><a class="reference internal" href="#easily-fetchable-eapi-inside-the-ebuild" id="id16">Easily fetchable EAPI inside the ebuild</a></li>
310<li><a class="reference internal" href="#easily-fetchable-eapi-inside-the-ebuild-and-one-time-extension-change" id="id16">Easily fetchable EAPI inside the ebuild and one-time extension change</a></li> 311<li><a class="reference internal" href="#easily-fetchable-eapi-inside-the-ebuild-and-one-time-extension-change" id="id17">Easily fetchable EAPI inside the ebuild and one-time extension change</a></li>
311<li><a class="reference internal" href="#use-different-subdirectories-for-different-eapis-i-e-cat-pkg-eapix" id="id17">Use different subdirectories for different EAPIs, i.e. cat/pkg/eapiX/</a></li> 312<li><a class="reference internal" href="#use-different-subdirectories-for-different-eapis-i-e-cat-pkg-eapix" id="id18">Use different subdirectories for different EAPIs, i.e. cat/pkg/eapiX/</a></li>
312</ul> 313</ul>
313</li> 314</li>
314<li><a class="reference internal" href="#references" id="id18">References</a></li> 315<li><a class="reference internal" href="#references" id="id19">References</a></li>
315<li><a class="reference internal" href="#copyright" id="id19">Copyright</a></li> 316<li><a class="reference internal" href="#copyright" id="id20">Copyright</a></li>
316</ul> 317</ul>
317</div> 318</div>
318<blockquote> 319<blockquote>
319<p>&quot;A little learning is a dangerous thing; drink deep, or taste not the Pierian 320<p>&quot;A little learning is a dangerous thing; drink deep, or taste not the Pierian
320spring: there shallow draughts intoxicate the brain, and drinking largely 321spring: there shallow draughts intoxicate the brain, and drinking largely
339eclass functionality).</li> 340eclass functionality).</li>
340<li>Add new global scope functions in any sane way.</li> 341<li>Add new global scope functions in any sane way.</li>
341<li>Extend versioning rules in an EAPI - for example, addition of the scm 342<li>Extend versioning rules in an EAPI - for example, addition of the scm
342suffix - GLEP54 <a class="footnote-reference" href="#glep54" id="id1">[1]</a> or allowing more sensible version formats like 343suffix - GLEP54 <a class="footnote-reference" href="#glep54" id="id1">[1]</a> or allowing more sensible version formats like
343<tt class="docutils literal"><span class="pre">1-rc1</span></tt>, <tt class="docutils literal"><span class="pre">1-alpha</span></tt> etc. to match upstream more closely.</li> 344<tt class="docutils literal"><span class="pre">1-rc1</span></tt>, <tt class="docutils literal"><span class="pre">1-alpha</span></tt> etc. to match upstream more closely.</li>
345<li>Use newer bash features.</li>
344</ul> 346</ul>
345</blockquote> 347</blockquote>
346</div> 348</div>
347<div class="section" id="current-behaviour"> 349<div class="section" id="current-behaviour">
348<h1><a class="toc-backref" href="#id5">Current behaviour</a></h1> 350<h1><a class="toc-backref" href="#id5">Current behaviour</a></h1>
419 421
420emerge: there are no ebuilds to satisfy &quot;sys-apps/foo&quot; 422emerge: there are no ebuilds to satisfy &quot;sys-apps/foo&quot;
421</pre> 423</pre>
422<p>Not the best error message, especially if there are lots of them.</p> 424<p>Not the best error message, especially if there are lots of them.</p>
423</div> 425</div>
426<div class="section" id="use-newer-bash-features">
427<h2><a class="toc-backref" href="#id9">Use newer bash features</a></h2>
428<p><tt class="docutils literal"><span class="pre">|&amp;</span></tt> is a new type of redirection added in bash-4. It cannot be used even in
429local scope as bash still parses the whole ebuild.</p>
430<p><tt class="docutils literal"><span class="pre">sys-apps/foo-1.ebuild</span></tt>:</p>
431<pre class="literal-block">
432EAPI=&quot;5&quot;
433
434foo() {
435 echo &quot;foo&quot; |&amp; cat
436}
437</pre>
438<p>Result:</p>
439<pre class="literal-block">
440/var/lib/gentoo/repositories/peper/sys-apps/foo/foo-1.ebuild: line 8: syntax error near unexpected token `&amp;'
441/var/lib/gentoo/repositories/peper/sys-apps/foo/foo-1.ebuild: line 8: ` echo &quot;foo&quot; |&amp; cat'
442*
443* ERROR: sys-apps/foo-1 failed.
444* Call stack:
445* ebuild.sh, line 1879: Called _source_ebuild
446* ebuild.sh, line 1818: Called die
447* The specific snippet of code:
448* source &quot;${EBUILD}&quot; || die &quot;error sourcing ebuild&quot;
449* The die message:
450* error sourcing ebuild
451*
452* If you need support, post the topmost build error, and the call stack if relevant.
453* This ebuild is from an overlay: '/var/lib/gentoo/repositories/peper/'
454* ... done!
455
456!!! All ebuilds that could satisfy &quot;sys-apps/foo&quot; have been masked.
457!!! One of the following masked packages is required to complete your request:
458- sys-apps/foo-1 (masked by: corruption)
459</pre>
460<p>Again, not the best error.</p>
461</div>
424</div> 462</div>
425<div class="section" id="abstract-solution"> 463<div class="section" id="abstract-solution">
426<h1><a class="toc-backref" href="#id9">Abstract solution</a></h1> 464<h1><a class="toc-backref" href="#id10">Abstract solution</a></h1>
427<p>A solution to this problem has to lift those limitations and the only way to do 465<p>A solution to this problem has to lift those limitations and the only way to do
428it is to make the EAPI of an ebuild available to the package managers in a way 466it is to make the EAPI of an ebuild available to the package managers in a way
429that doesn't require them to source the ebuild. Another important requirement is 467that doesn't require them to source the ebuild. Another important requirement is
430for the solution to be backward compatible, which has the pleasant side-effect 468for the solution to be backward compatible, which has the pleasant side-effect
431of making the solution applicable in the Gentoo tree right away. Opposed to 469of making the solution applicable in the Gentoo tree right away. Opposed to
432waiting an arbitrary amount of time, which is never long enough anyway, as the 470waiting an arbitrary amount of time, which is never long enough anyway, as the
433issues listed on the common portage problems page - <a class="footnote-reference" href="#portageproblems" id="id2">[2]</a> - show.</p> 471issues listed on the common portage problems page - <a class="footnote-reference" href="#portageproblems" id="id2">[2]</a> - show.</p>
434</div> 472</div>
435<div class="section" id="proposed-solution"> 473<div class="section" id="proposed-solution">
436<h1><a class="toc-backref" href="#id10">Proposed solution</a></h1> 474<h1><a class="toc-backref" href="#id11">Proposed solution</a></h1>
437<p>The proposed solution is to use EAPI-suffixed file extensions for ebuilds. This 475<p>The proposed solution is to use EAPI-suffixed file extensions for ebuilds. This
438allows package managers to trivially read the EAPI from the ebuild filename. It 476allows package managers to trivially read the EAPI from the ebuild filename. It
439is also backwards compatible, because currently ebuilds are recognised by the 477is also backwards compatible, because currently ebuilds are recognised by the
440<tt class="docutils literal"><span class="pre">.ebuild</span></tt> file extension and hence EAPI-suffixed ebuilds are simply ignored by 478<tt class="docutils literal"><span class="pre">.ebuild</span></tt> file extension and hence EAPI-suffixed ebuilds are simply ignored by
441the package managers.</p> 479the package managers.</p>
442</div> 480</div>
443<div class="section" id="specification"> 481<div class="section" id="specification">
444<h1><a class="toc-backref" href="#id11">Specification</a></h1> 482<h1><a class="toc-backref" href="#id12">Specification</a></h1>
445<p>Ebuild filename extension syntax: <tt class="docutils literal"><span class="pre">ebuild[-&lt;EAPI&gt;]</span></tt>, where <tt class="docutils literal"><span class="pre">[]</span></tt> denotes an 483<p>Ebuild filename extension syntax: <tt class="docutils literal"><span class="pre">ebuild[-&lt;EAPI&gt;]</span></tt>, where <tt class="docutils literal"><span class="pre">[]</span></tt> denotes an
446optional part, and <tt class="docutils literal"><span class="pre">&lt;EAPI&gt;</span></tt> is the EAPI of the ebuild.</p> 484optional part, and <tt class="docutils literal"><span class="pre">&lt;EAPI&gt;</span></tt> is the EAPI of the ebuild.</p>
447<p>The EAPI used by the ebuild is the EAPI included in the filename if it is set. 485<p>The EAPI used by the ebuild is the EAPI included in the filename if it is set.
448Otherwise the EAPI set inside the ebuild is used, which defaults to 0 (this is 486Otherwise the EAPI set inside the ebuild is used, which defaults to 0 (this is
449the current behaviour).</p> 487the current behaviour).</p>
480second is ensuring that all the ebuilds for a single category/package-version 518second is ensuring that all the ebuilds for a single category/package-version
481are equivalent, i.e. installing any of them has exactly the same effect on a 519are equivalent, i.e. installing any of them has exactly the same effect on a
482given system.</p> 520given system.</p>
483</div> 521</div>
484<div class="section" id="summary-of-ideas"> 522<div class="section" id="summary-of-ideas">
485<h1><a class="toc-backref" href="#id12">Summary of ideas</a></h1> 523<h1><a class="toc-backref" href="#id13">Summary of ideas</a></h1>
486<div class="section" id="eapi-suffixed-ebuilds-proposed-solution"> 524<div class="section" id="eapi-suffixed-ebuilds-proposed-solution">
487<h2><a class="toc-backref" href="#id13">EAPI-suffixed ebuilds (proposed solution)</a></h2> 525<h2><a class="toc-backref" href="#id14">EAPI-suffixed ebuilds (proposed solution)</a></h2>
488<dl class="docutils"> 526<dl class="docutils">
489<dt>Properties:</dt> 527<dt>Properties:</dt>
490<dd><ul class="first last simple"> 528<dd><ul class="first last simple">
491<li>Can be used right away: yes</li> 529<li>Can be used right away: yes</li>
492<li>Hurts performance: no</li> 530<li>Hurts performance: no</li>
494</dd> 532</dd>
495</dl> 533</dl>
496<p>Some say it is clear and simple, others that it is ugly and unintuitive.</p> 534<p>Some say it is clear and simple, others that it is ugly and unintuitive.</p>
497</div> 535</div>
498<div class="section" id="eapi-in-the-filename-with-one-time-extension-change"> 536<div class="section" id="eapi-in-the-filename-with-one-time-extension-change">
499<h2><a class="toc-backref" href="#id14">EAPI in the filename with one-time extension change</a></h2> 537<h2><a class="toc-backref" href="#id15">EAPI in the filename with one-time extension change</a></h2>
500<p>One of the proposed filename formats: 538<p>One of the proposed filename formats:
501<tt class="docutils literal"><span class="pre">&lt;PKG&gt;-&lt;VER&gt;.eapi-&lt;EAPI&gt;.eb</span></tt></p> 539<tt class="docutils literal"><span class="pre">&lt;PKG&gt;-&lt;VER&gt;.eapi-&lt;EAPI&gt;.eb</span></tt></p>
502<dl class="docutils"> 540<dl class="docutils">
503<dt>Properties:</dt> 541<dt>Properties:</dt>
504<dd><ul class="first last simple"> 542<dd><ul class="first last simple">
509</dl> 547</dl>
510<p>This is equivalent to the proposed solution.</p> 548<p>This is equivalent to the proposed solution.</p>
511<p>Some say it is better because the extension is static.</p> 549<p>Some say it is better because the extension is static.</p>
512</div> 550</div>
513<div class="section" id="easily-fetchable-eapi-inside-the-ebuild"> 551<div class="section" id="easily-fetchable-eapi-inside-the-ebuild">
514<h2><a class="toc-backref" href="#id15">Easily fetchable EAPI inside the ebuild</a></h2> 552<h2><a class="toc-backref" href="#id16">Easily fetchable EAPI inside the ebuild</a></h2>
515<dl class="docutils"> 553<dl class="docutils">
516<dt>Properties:</dt> 554<dt>Properties:</dt>
517<dd><ul class="first last simple"> 555<dd><ul class="first last simple">
518<li>Can be used right away: no</li> 556<li>Can be used right away: no</li>
519<li>Hurts performance: yes</li> 557<li>Hurts performance: yes</li>
526picture package managers need EAPI to parse the ebuild's version. That means that merely 564picture package managers need EAPI to parse the ebuild's version. That means that merely
527picking the best version of a package requires loading EAPI (from cache or the 565picking the best version of a package requires loading EAPI (from cache or the
528ebuild) for each available ebuild.</p> 566ebuild) for each available ebuild.</p>
529</div> 567</div>
530<div class="section" id="easily-fetchable-eapi-inside-the-ebuild-and-one-time-extension-change"> 568<div class="section" id="easily-fetchable-eapi-inside-the-ebuild-and-one-time-extension-change">
531<h2><a class="toc-backref" href="#id16">Easily fetchable EAPI inside the ebuild and one-time extension change</a></h2> 569<h2><a class="toc-backref" href="#id17">Easily fetchable EAPI inside the ebuild and one-time extension change</a></h2>
532<dl class="docutils"> 570<dl class="docutils">
533<dt>Properties:</dt> 571<dt>Properties:</dt>
534<dd><ul class="first last simple"> 572<dd><ul class="first last simple">
535<li>Can be used right away: yes</li> 573<li>Can be used right away: yes</li>
536<li>Hurts performance: yes</li> 574<li>Hurts performance: yes</li>
540<p>Performance decrease as described in the previous section.</p> 578<p>Performance decrease as described in the previous section.</p>
541<p>Some say it is clear and simple, others that it is confusing and unintuitive, 579<p>Some say it is clear and simple, others that it is confusing and unintuitive,
542because of the arbitrary format restrictions in what is a bash script otherwise.</p> 580because of the arbitrary format restrictions in what is a bash script otherwise.</p>
543</div> 581</div>
544<div class="section" id="use-different-subdirectories-for-different-eapis-i-e-cat-pkg-eapix"> 582<div class="section" id="use-different-subdirectories-for-different-eapis-i-e-cat-pkg-eapix">
545<h2><a class="toc-backref" href="#id17">Use different subdirectories for different EAPIs, i.e. cat/pkg/eapiX/</a></h2> 583<h2><a class="toc-backref" href="#id18">Use different subdirectories for different EAPIs, i.e. cat/pkg/eapiX/</a></h2>
546<dl class="docutils"> 584<dl class="docutils">
547<dt>Properties:</dt> 585<dt>Properties:</dt>
548<dd><ul class="first last simple"> 586<dd><ul class="first last simple">
549<li>Can be used right away: yes</li> 587<li>Can be used right away: yes</li>
550<li>Hurts performance: yes</li> 588<li>Hurts performance: yes</li>
555reads.</p> 593reads.</p>
556<p>Some say that it makes it much harder for maintainers to see what they have.</p> 594<p>Some say that it makes it much harder for maintainers to see what they have.</p>
557</div> 595</div>
558</div> 596</div>
559<div class="section" id="references"> 597<div class="section" id="references">
560<h1><a class="toc-backref" href="#id18">References</a></h1> 598<h1><a class="toc-backref" href="#id19">References</a></h1>
561<table class="docutils footnote" frame="void" id="glep54" rules="none"> 599<table class="docutils footnote" frame="void" id="glep54" rules="none">
562<colgroup><col class="label" /><col /></colgroup> 600<colgroup><col class="label" /><col /></colgroup>
563<tbody valign="top"> 601<tbody valign="top">
564<tr><td class="label"><a class="fn-backref" href="#id1">[1]</a></td><td>GLEP 54, scm package version suffix 602<tr><td class="label"><a class="fn-backref" href="#id1">[1]</a></td><td>GLEP 54, scm package version suffix
565(<a class="reference external" href="http://glep.gentoo.org/glep-0054.html">http://glep.gentoo.org/glep-0054.html</a>)</td></tr> 603(<a class="reference external" href="http://glep.gentoo.org/glep-0054.html">http://glep.gentoo.org/glep-0054.html</a>)</td></tr>
572(<a class="reference external" href="http://www.gentoo.org/proj/en/portage/doc/common-problems.xml">http://www.gentoo.org/proj/en/portage/doc/common-problems.xml</a>)</td></tr> 610(<a class="reference external" href="http://www.gentoo.org/proj/en/portage/doc/common-problems.xml">http://www.gentoo.org/proj/en/portage/doc/common-problems.xml</a>)</td></tr>
573</tbody> 611</tbody>
574</table> 612</table>
575</div> 613</div>
576<div class="section" id="copyright"> 614<div class="section" id="copyright">
577<h1><a class="toc-backref" href="#id19">Copyright</a></h1> 615<h1><a class="toc-backref" href="#id20">Copyright</a></h1>
578<p>This document has been placed in the public domain.</p> 616<p>This document has been placed in the public domain.</p>
579<!-- vim: set tw=80 fileencoding=utf-8 spell spelllang=en et : --> 617<!-- vim: set tw=80 fileencoding=utf-8 spell spelllang=en et : -->
580</div> 618</div>
581 619
582</div> 620</div>
583<div class="footer"> 621<div class="footer">
584<hr class="footer" /> 622<hr class="footer" />
585<a class="reference external" href="glep-0055.txt">View document source</a>. 623<a class="reference external" href="glep-0055.txt">View document source</a>.
586Generated on: 2009-05-17 15:29 UTC. 624Generated on: 2009-05-17 16:58 UTC.
587Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source. 625Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
588 626
589</div> 627</div>
590</body> 628</body>
591</html> 629</html>

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.20