* Re: [gentoo-dev] RFD : .ebuild is only bash
@ 2012-03-14 2:38 99% ` Brian Harring
0 siblings, 0 replies; 1+ results
From: Brian Harring @ 2012-03-14 2:38 UTC (permalink / raw
To: Zac Medico; +Cc: gentoo-dev
On Tue, Mar 13, 2012 at 07:05:57PM -0700, Zac Medico wrote:
> On 03/13/2012 06:42 PM, Brian Harring wrote:
> > Leaving it such that the PM has to enforce things like "don't have
> > multiple EAPI assignments" means by default, one of them isn't going
> > to... leading to the ebuilds breaking... specifically the common case
> > being the ebuild becoming acclimated to some quirk of portage.
>
> My intention is for PMS to specify the search algorithm that's used to
> probe the EAPI, and also for it to specify that package managers must
> treat an ebuild as invalid if the probed EAPI is not identical to the
> one that's obtained from bash.
*Now* is when you should be applying your KISS wikipedia links
(moreso, the principle applied to your proposal).
What you're talking about is requiring PMs to monitor what occured
and bail- rather than precluding it from even occuring. I repeat; try
to spot the situation and make things blow up, rather than disallowing
it from occuring in the first place.
It's really that simple; this is why the "grep the assignment" out of
the source is at its core, a well intentioned but fundamentally bad
idea. It's glue on a bad situation rather than just removing the bad
situation.
> If all package managers adhere strictly
> to these two requirements, then we won't have any incompatibilities
> between package managers here.
You're missing a lot of the point here; defining some search algo is
basically screwed at its core due to the flexibility of bash. Simple
example:
if [ "$PV" -eq 9999 ]; then
EAPI=3
else
EAPI=2
fi
The flexibility of bash means that your attempt to enforce simplistic
rules like "it must be greppable" are at loggerheads; if the rules
were "last is the one thats used", then I just invert the if check.
Yep, the above is stupid code. Frankly, the sort of stupid code
I'd expect out of a newbie ebuild dev. The EAPI bit there is
synthetic, but that sort of construct (putting everything into a
single file, then using symlinks to expose differing versions) is out
in the wild and used.
The fact that potential exists is a flat out sign the approach is
broken. Worse, it's a way to trip up people- specifically new devs
who don't know fun rules like "the PM has this lovely search algo for
getting EAPI that you must abide by".
~brian
^ permalink raw reply [relevance 99%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2012-03-12 15:57 [gentoo-dev] RFD : .ebuild is only bash Kent Fredric
2012-03-12 15:59 ` Ciaran McCreesh
2012-03-12 16:51 ` Rich Freeman
2012-03-12 17:05 ` Ulrich Mueller
2012-03-12 17:12 ` Ciaran McCreesh
2012-03-13 6:41 ` Walter Dnes
2012-03-13 7:30 ` Ciaran McCreesh
2012-03-14 0:29 ` Walter Dnes
2012-03-14 1:42 ` Brian Harring
2012-03-14 2:05 ` Zac Medico
2012-03-14 2:38 99% ` Brian Harring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox