| … | |
… | |
| 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 17:00:30 $ |
14 | :date: $Date: 2009/05/17 20:56:53 $ |
| 15 | :version: $Revision: 1.4 $ |
15 | :version: $Revision: 1.5 $ |
| 16 | :copyright: This stylesheet has been placed in the public domain. |
16 | :copyright: This stylesheet has been placed in the public domain. |
| 17 | |
17 | |
| 18 | Default cascading style sheet for the PEP HTML output of Docutils. |
18 | Default 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.3</td> |
273 | <tr class="field"><th class="field-name">Version:</th><td class="field-body">1.4</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">2009/05/17 15:50:27</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 17:00:30</a></td> |
| 276 | </tr> |
276 | </tr> |
| 277 | <tr class="field"><th class="field-name">Author:</th><td class="field-body">Piotr Jaroszyński <peper at gentoo.org></td> |
277 | <tr class="field"><th class="field-name">Author:</th><td class="field-body">Piotr Jaroszyński <peper at gentoo.org></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> |
| … | |
… | |
| 516 | allowing authors to provide backwards compatible ebuilds, it would introduce |
516 | allowing authors to provide backwards compatible ebuilds, it would introduce |
| 517 | problems too. The first is the requirement to have strict EAPI ordering, the |
517 | problems too. The first is the requirement to have strict EAPI ordering, the |
| 518 | second is ensuring that all the ebuilds for a single category/package-version |
518 | second is ensuring that all the ebuilds for a single category/package-version |
| 519 | are equivalent, i.e. installing any of them has exactly the same effect on a |
519 | are equivalent, i.e. installing any of them has exactly the same effect on a |
| 520 | given system.</p> |
520 | given system.</p> |
|
|
521 | <p>Also note that it is not a new restriction. It is already possible to illegally |
|
|
522 | have multiple versions with different EAPIs as e.g. <tt class="docutils literal"><span class="pre">1.0</span> <span class="pre">==</span> <span class="pre">1.00</span> <span class="pre">==</span> <span class="pre">1.00-r0</span></tt> |
|
|
523 | and hence you could have <tt class="docutils literal"><span class="pre">foo-1.0.ebuild</span></tt> with EAPI X and <tt class="docutils literal"><span class="pre">foo-1.00.ebuild</span></tt> |
|
|
524 | with EAPI Y.</p> |
| 521 | </div> |
525 | </div> |
| 522 | <div class="section" id="summary-of-ideas"> |
526 | <div class="section" id="summary-of-ideas"> |
| 523 | <h1><a class="toc-backref" href="#id13">Summary of ideas</a></h1> |
527 | <h1><a class="toc-backref" href="#id13">Summary of ideas</a></h1> |
| 524 | <div class="section" id="eapi-suffixed-ebuilds-proposed-solution"> |
528 | <div class="section" id="eapi-suffixed-ebuilds-proposed-solution"> |
| 525 | <h2><a class="toc-backref" href="#id14">EAPI-suffixed ebuilds (proposed solution)</a></h2> |
529 | <h2><a class="toc-backref" href="#id14">EAPI-suffixed ebuilds (proposed solution)</a></h2> |
| … | |
… | |
| 562 | behaviour section for old package managers.</p> |
566 | behaviour section for old package managers.</p> |
| 563 | <p>Performance decrease comes from the fact that with version format changes in the |
567 | <p>Performance decrease comes from the fact that with version format changes in the |
| 564 | picture package managers need EAPI to parse the ebuild's version. That means that merely |
568 | picture package managers need EAPI to parse the ebuild's version. That means that merely |
| 565 | picking the best version of a package requires loading EAPI (from cache or the |
569 | picking the best version of a package requires loading EAPI (from cache or the |
| 566 | ebuild) for each available ebuild.</p> |
570 | ebuild) for each available ebuild.</p> |
|
|
571 | <p>Here is more or less how the package manager figures out the best available |
|
|
572 | version for a package with N versions available.</p> |
|
|
573 | <blockquote> |
|
|
574 | <ul class="simple"> |
|
|
575 | <li>EAPI in the filename<ul> |
|
|
576 | <li>Read the directory containing the package - readdir()</li> |
|
|
577 | <li>For each ebuild, read its EAPI and using that parse its version - no I/O</li> |
|
|
578 | <li>Sort the versions - no I/O</li> |
|
|
579 | <li>Going down from the highest to the lowest version<ul> |
|
|
580 | <li>Get the metadata from cache - 2 x stat() + read()</li> |
|
|
581 | <li>break if the version is visible</li> |
|
|
582 | </ul> |
|
|
583 | </li> |
|
|
584 | </ul> |
|
|
585 | </li> |
|
|
586 | <li>EAPI in the ebuild<ul> |
|
|
587 | <li>Read the directory containing the package - readdir()</li> |
|
|
588 | <li>For each ebuild load its metadata from cache to get its EAPI - N x (2 x stat() + read())</li> |
|
|
589 | <li>Sort the versions - no I/O</li> |
|
|
590 | <li>Going down from the highest to the lowest version<ul> |
|
|
591 | <li>(metadata is already loaded) - no I/O</li> |
|
|
592 | <li>break if the version is visible - no I/O</li> |
|
|
593 | </ul> |
|
|
594 | </li> |
|
|
595 | </ul> |
|
|
596 | </li> |
|
|
597 | </ul> |
|
|
598 | </blockquote> |
|
|
599 | <p>The difference is in for how many versions the package manager needs to hit |
|
|
600 | cache. With EAPI in the ebuild it needs to do that for all versions, with EAPI |
|
|
601 | in the filename it depends on versions visibility. |
|
|
602 | For example, package foo has versions 1, 2, 3, 4, 5 and 6. 6 is masked, 5 is |
|
|
603 | ~arch and 1,2,3 and 4 are arch. Say, the user accepts only arch for this |
|
|
604 | package. With EAPI in the filename it will read metadata only for versions |
|
|
605 | 6, 5 and 4. With EAPI in the ebuild it needs to load metadata for all versions.</p> |
|
|
606 | <p>It's hard to say what's the avarage case, but surely the worst case scenario |
|
|
607 | (when only the lowest version is visible) is uncommon.</p> |
| 567 | </div> |
608 | </div> |
| 568 | <div class="section" id="easily-fetchable-eapi-inside-the-ebuild-and-one-time-extension-change"> |
609 | <div class="section" id="easily-fetchable-eapi-inside-the-ebuild-and-one-time-extension-change"> |
| 569 | <h2><a class="toc-backref" href="#id17">Easily fetchable EAPI inside the ebuild and one-time extension change</a></h2> |
610 | <h2><a class="toc-backref" href="#id17">Easily fetchable EAPI inside the ebuild and one-time extension change</a></h2> |
| 570 | <dl class="docutils"> |
611 | <dl class="docutils"> |
| 571 | <dt>Properties:</dt> |
612 | <dt>Properties:</dt> |
| … | |
… | |
| 619 | |
660 | |
| 620 | </div> |
661 | </div> |
| 621 | <div class="footer"> |
662 | <div class="footer"> |
| 622 | <hr class="footer" /> |
663 | <hr class="footer" /> |
| 623 | <a class="reference external" href="glep-0055.txt">View document source</a>. |
664 | <a class="reference external" href="glep-0055.txt">View document source</a>. |
| 624 | Generated on: 2009-05-17 16:58 UTC. |
665 | Generated on: 2009-05-17 20:42 UTC. |
| 625 | Generated 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. |
666 | Generated 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. |
| 626 | |
667 | |
| 627 | </div> |
668 | </div> |
| 628 | </body> |
669 | </body> |
| 629 | </html> |
670 | </html> |