Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: michael@××××××××.com
Subject: Re: [gentoo-dev] RFD: EAPI specification in ebuilds
Date: Thu, 08 Mar 2012 17:27:14
Message-Id: 20120308182844.11201771@pomiocik.lan
In Reply to: Re: [gentoo-dev] RFD: EAPI specification in ebuilds by Michael Orlitzky
On Thu, 08 Mar 2012 10:56:21 -0500
Michael Orlitzky <michael@××××××××.com> wrote:

> On 03/08/2012 07:03 AM, Michał Górny wrote: > >> > >> Someone suggested using a standard shebang the last time this came > >> up, and if I remember correctly it was one of the > >> least-disagreeable solutions proposed. We could of course define > >> our own custom format, but I think something like, > >> > >> #!/usr/bin/eapi5 > >> > >> would be perfect if we could hand off the interpretation of the > >> ebuild to that program. That solves the problem with new bash > >> features, too, since you could point that command at a specific > >> version. > > > > And what would /usr/bin/eapi5 do? Are you suggesting misusing > > shebang or making ebuilds PM-centric? > > > > I was saying that I'd prefer a more-standard use of the shebang (if > possible), rather than defining our own header comment syntax. Either > way I think the second option is cleaner than regular expressions. > > Right now, we're guaranteed the features of bash-3.2. I guess we > actually use whatever is executing to source them. But we > need to interpret the ebuild file with something: we might as well > put *that* in the shebang, since that's what it's for. > > So if we were to do this with an ebuild right now, we'd add, > > #!/usr/bin/eapi4 > > to the header, and instead of sourcing the ebuild with whatever > is using, we would run it with 'eapi4' and pass whatever we > need back and forth. Or maybe would reload itself using > 'eapi4'. If any of that makes sense, the PMS would just need to > specify some requirements on the shebang command.
And something will need to provide that /usr/bin/eapi4 thing. And that introduces new problems: 1) how are we going to support multiple package managers? will we need to install eapi4 thing as a smart wrapper choosing the right PM? 2) what about Prefix? #!/usr/bin/env eapi4 then, or proactive updating of shebangs in synced ebuilds? and then regenerating the whole cache (guess how long does it take to update it), 3) what should happen if user executes ebuild? the ebuild should merge itself? with dependencies or without? -- Best regards, Michał Górny


File name MIME type
signature.asc application/pgp-signature


Subject Author
Re: [gentoo-dev] RFD: EAPI specification in ebuilds Michael Orlitzky <michael@××××××××.com>