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

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

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

Revision 1.4 Revision 1.5
1GLEP: 55 1GLEP: 55
2Title: Use EAPI-suffixed ebuilds (.ebuild-EAPI) 2Title: Use EAPI-suffixed ebuilds (.ebuild-EAPI)
3Version: $Revision: 1.4 $ 3Version: $Revision: 1.5 $
4Last-Modified: $Date: 2009/05/17 17:00:30 $ 4Last-Modified: $Date: 2009/05/17 20:56:53 $
5Author: Piotr Jaroszyński <peper@gentoo.org> 5Author: Piotr Jaroszyński <peper@gentoo.org>
6Status: Draft 6Status: Draft
7Type: Standards Track 7Type: Standards Track
8Content-Type: text/x-rst 8Content-Type: text/x-rst
9Created: 17-Dec-2007 9Created: 17-Dec-2007
215problems too. The first is the requirement to have strict EAPI ordering, the 215problems too. The first is the requirement to have strict EAPI ordering, the
216second is ensuring that all the ebuilds for a single category/package-version 216second is ensuring that all the ebuilds for a single category/package-version
217are equivalent, i.e. installing any of them has exactly the same effect on a 217are equivalent, i.e. installing any of them has exactly the same effect on a
218given system. 218given system.
219 219
220Also note that it is not a new restriction. It is already possible to illegally
221have multiple versions with different EAPIs as e.g. ``1.0 == 1.00 == 1.00-r0``
222and hence you could have ``foo-1.0.ebuild`` with EAPI X and ``foo-1.00.ebuild``
223with EAPI Y.
224
220Summary of ideas 225Summary of ideas
221================ 226================
222 227
223EAPI-suffixed ebuilds (proposed solution) 228EAPI-suffixed ebuilds (proposed solution)
224----------------------------------------- 229-----------------------------------------
256Performance decrease comes from the fact that with version format changes in the 261Performance decrease comes from the fact that with version format changes in the
257picture package managers need EAPI to parse the ebuild's version. That means that merely 262picture package managers need EAPI to parse the ebuild's version. That means that merely
258picking the best version of a package requires loading EAPI (from cache or the 263picking the best version of a package requires loading EAPI (from cache or the
259ebuild) for each available ebuild. 264ebuild) for each available ebuild.
260 265
266Here is more or less how the package manager figures out the best available
267version for a package with N versions available.
268
269 * EAPI in the filename
270
271 * Read the directory containing the package - readdir()
272 * For each ebuild, read its EAPI and using that parse its version - no I/O
273 * Sort the versions - no I/O
274 * Going down from the highest to the lowest version
275
276 * Get the metadata from cache - 2 x stat() + read()
277 * break if the version is visible
278
279 * EAPI in the ebuild
280
281 * Read the directory containing the package - readdir()
282 * For each ebuild load its metadata from cache to get its EAPI - N x (2 x stat() + read())
283 * Sort the versions - no I/O
284 * Going down from the highest to the lowest version
285
286 * (metadata is already loaded) - no I/O
287 * break if the version is visible - no I/O
288
289The difference is in for how many versions the package manager needs to hit
290cache. With EAPI in the ebuild it needs to do that for all versions, with EAPI
291in the filename it depends on versions visibility.
292For example, package foo has versions 1, 2, 3, 4, 5 and 6. 6 is masked, 5 is
293~arch and 1,2,3 and 4 are arch. Say, the user accepts only arch for this
294package. With EAPI in the filename it will read metadata only for versions
2956, 5 and 4. With EAPI in the ebuild it needs to load metadata for all versions.
296
297It's hard to say what's the avarage case, but surely the worst case scenario
298(when only the lowest version is visible) is uncommon.
261 299
262Easily fetchable EAPI inside the ebuild and one-time extension change 300Easily fetchable EAPI inside the ebuild and one-time extension change
263--------------------------------------------------------------------- 301---------------------------------------------------------------------
264 302
265Properties: 303Properties:

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

  ViewVC Help
Powered by ViewVC 1.1.20