From: Brian Harring <ferringb@gmail.com>
To: Zac Medico <zmedico@gentoo.org>
Cc: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] RFD : .ebuild is only bash
Date: Tue, 13 Mar 2012 19:38:14 -0700 [thread overview]
Message-ID: <20120314023814.GC7731@localhost> (raw)
In-Reply-To: <4F5FFD05.2010801@gentoo.org>
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
next prev parent reply other threads:[~2012-03-14 2:39 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAATnKFD=9VEkpUcABbhHbAu96Qn+dP+YEuUu2YCqDUNKUxe+Cw@mail.gmail.com>
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-12 17:17 ` Michael Orlitzky
2012-03-12 17:22 ` Ciaran McCreesh
2012-03-12 17:30 ` Zac Medico
2012-03-12 17:22 ` Zac Medico
2012-03-12 18:00 ` Ulrich Mueller
2012-03-12 18:04 ` Ciaran McCreesh
2012-03-12 18:17 ` Ulrich Mueller
2012-03-12 18:28 ` Ciaran McCreesh
2012-03-12 18:50 ` Ulrich Mueller
2012-03-12 18:58 ` Ian Stakenvicius
2012-03-12 19:01 ` Ciaran McCreesh
2012-03-12 19:49 ` Ulrich Mueller
2012-03-12 20:10 ` Ciaran McCreesh
2012-03-12 20:21 ` James Broadhead
2012-03-12 21:14 ` Ulrich Mueller
2012-03-12 21:28 ` Kent Fredric
2012-03-12 21:49 ` Alec Warner
2012-03-12 22:02 ` Mike Gilbert
2012-03-12 22:37 ` Kent Fredric
2012-03-12 22:53 ` Alec Warner
2012-03-13 6:31 ` [gentoo-dev] " Duncan
2012-03-12 22:55 ` [gentoo-dev] " James Broadhead
2012-03-13 6:06 ` Ulrich Mueller
2012-03-12 22:06 ` James Broadhead
2012-03-12 22:17 ` Alec Warner
2012-03-12 19:00 ` Ciaran McCreesh
2012-03-12 19:38 ` Ulrich Mueller
2012-03-12 19:42 ` Ciaran McCreesh
2012-03-13 20:33 ` Brian Harring
2012-03-13 0:51 ` Patrick Lauer
2012-03-12 18:29 ` Kent Fredric
2012-03-13 4:31 ` Brian Harring
2012-03-13 5:14 ` Kent Fredric
2012-03-13 6:22 ` Brian Harring
2012-03-13 16:10 ` Wulf C. Krueger
2012-03-13 19:08 ` Brian Harring
2012-03-13 7:11 ` [gentoo-dev] " Duncan
2012-03-12 18:01 ` [gentoo-dev] " Michał Górny
2012-03-12 17:53 ` Ulrich Mueller
2012-03-12 18:03 ` Kent Fredric
2012-03-13 0:46 ` Patrick Lauer
2012-03-13 6:41 ` Walter Dnes
2012-03-13 6:56 ` Kent Fredric
2012-03-13 7:03 ` Brian Harring
2012-03-13 8:50 ` Ulrich Mueller
2012-03-13 15:52 ` Zac Medico
2012-03-13 7:30 ` Ciaran McCreesh
2012-03-14 0:29 ` Walter Dnes
2012-03-14 0:48 ` Michael Orlitzky
2012-03-14 1:42 ` Brian Harring
2012-03-14 2:05 ` Zac Medico
2012-03-14 2:23 ` Michael Orlitzky
2012-03-14 2:36 ` Zac Medico
2012-03-14 2:38 ` Michael Orlitzky
2012-03-14 2:38 ` Brian Harring [this message]
2012-03-14 2:47 ` Zac Medico
2012-03-12 16:56 ` Ulrich Mueller
2012-03-12 18:04 ` Michał Górny
2012-03-13 6:29 ` Richard Yao
2012-03-13 11:52 ` Rich Freeman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120314023814.GC7731@localhost \
--to=ferringb@gmail.com \
--cc=gentoo-dev@lists.gentoo.org \
--cc=zmedico@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox