Gentoo Archives: gentoo-dev

From: Richard Freeman <rich0@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: GLEP 55
Date: Tue, 10 Jun 2008 16:36:36
Message-Id: 484E8650.8050706@gentoo.org
In Reply to: Re: [gentoo-dev] Re: GLEP 55 by "Rémi Cardona"
1 Rémi Cardona wrote:
2 > Ciaran McCreesh a écrit :
3 >> Kills the upgrade path completely. No good.
4 >
5 > Lemme sum this up in layman's terms :
6 >
7 > 1) EAPI _has_ to be known before sourcing an ebuild. There's no way to
8 > avoid that for various reasons, all 100% valid.
9 >
10 > 2) Putting the EAPI in the filename :
11 >
12 > + it solves 1)
13 > + it keeps backward compatibility because old PM won't recognize the
14 > filenames
15 > - it's not very "pretty"
16 >
17 > 3) Putting the EAPI in metadata.xml or in another external file
18 >
19 > + it solves 1)
20 > + it keeps pretty file names
21 > - it breaks backwards compatibility
22 > - (specific to metadata.xml) PM will have to learn to read XML (yuck)
23 >
24 > That's about it, right?
25 >
26
27 You missed some options - I'll try to be honest about their pros/cons:
28
29 4) Putting EAPI inside the ebuild, but in a manner that does not require
30 sourcing using bash (ie comment at top of file).
31
32 + it solves 1)
33 + it keeps pretty file names
34 + syntax/implementation is trivial
35 - it breaks backwards compatibility (eventually - hacks might delay this)
36 - it does force future ebuilds to have the EAPI line in it
37
38 5) Putting EAPI inside the ebuild as in #4, but do a one-time-only
39 change of the filenames.
40
41 + it solves 1)
42 + it sort-of-keeps pretty file names (two pretty extensions instead of one)
43 + syntax/implementation is trivial
44 + it preserves backwards compatibility
45 - it does force future ebuilds to have the EAPI line in it
46
47 6) Putting EAPI inside the ebuild as in #4, and do a one-time rsync
48 location change
49
50 + it solves 1)
51 + the filenames don't change at all
52 + syntax is trivial, future ebuilds are trivial
53 + it preserves backwards compatibility
54 - it does force future ebuilds to have the EAPI line in it
55 - it seems like quite a hack - and you end up with a dummy portage tree
56 sitting out there for some period of time
57
58
59 Personally, I tend to lean towards either just putting the EAPI in the
60 filename, or putting it in the first line and breaking backwards
61 compatibility. The whole reason we're in this mess is the ebuild file
62 format does not include a version field or the equivalent of extensible
63 headers used in other sorts of files (tar, etc). We've certainly broken
64 backwards-compatibility before with other changes within the distro.
65 All we need to do is make it easy to update to a package manager that
66 fixes the break and post instructions prominently, and make sure that
67 package managers support the new process for a few months before taking
68 advantage of it.
69
70 Some object to parsing out the EAPI without sourcing the ebuild (only
71 bash can source bash). I disagree with this argument - every time you
72 run a shell script it is sourced by something other than bash - the
73 kernel has to figure out what script interpreter to use by parsing the
74 first line. There is no reason we can't use a magic number in the same
75 way with the EAPI. That isn't reason enough on its own to put the EAPI
76 in the filename, but it is a start.
77
78 Most software packages store version information internal to a file
79 format. I'm actually not aware of many that put it in the filename.
80 --
81 gentoo-dev@l.g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] Re: GLEP 55 Joe Peterson <lavajoe@g.o>
Re: [gentoo-dev] Re: GLEP 55 Ciaran McCreesh <ciaran.mccreesh@××××××××××.com>