From: Brian Harring <ferringb@gmail.com>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] HDEPEND (host dependencies for cross-compilation) for EAPI 5?
Date: Thu, 6 Sep 2012 01:11:45 -0700 [thread overview]
Message-ID: <20120906081145.GC18495@localhost> (raw)
In-Reply-To: <50469795.2070901@gentoo.org>
On Wed, Sep 05, 2012 at 12:06:45AM +0000, Jorge Manuel B. S. Vicetto wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 31-08-2012 20:46, Ciaran McCreesh wrote:
>
> <snip>
>
> > Also, we're getting rather a lot of *DEPEND variables here... If
> > we're making people make major changes to their deps, which for
> > HDEPEND we definitely would be, then the "it's expensive since
> > people would have to redo their deps" argument against a combined
> > DEPENDENCIES variable goes out of the window, so we should rethink
> > that too.
>
> I have to agree with Ciaran, instead of multiplying DEPEND variables,
> it's probably time we move to a single DEPENDENCIES variable.
Personally, my complaints re: it are that 1) while minor, the
labels in some cases are overly verbose; recommendations instead of
recommends, suggestions instead of suggests, etc. 2) An actual
flaw in their design (imo): it tries to intermix two different
forms of parsing, without any real justification for *why* beyond
*hey look kids, I can!*; The two can intersect in slightly fucked
up ways, case in point:
DEPENDENCIES="
run+build:
cat/the
x? ( cat/cow
test:
y? ( cat/says
z? ( cat/moo
)))
Now, there may be some unstated rules that disallow that, but if that
*is* allowed, that's frankly dumb. As to if it's disallowed, it's
kind of a design flaw that the situation can occur requiring an
explicit suppression.
Rather than invent and try intermixing a secondary form, just using
the existing strikes me as saner; either we can have a specific
use_expand group like thus:
DEPENDENCIES="
dep_run? ( cat/monkeys )
dep_run+build? ( cat/foo )"
Or, preferable imo, do away w/ the +, use a more natural ',' for phase
separation, and use ':';
DEPENDENCIES="
dep:run? ( cat/monkeys )
dep:run,build? ( cat/foo )"
Doing it that way reuses the existing parsing infrastructure (good)
via just requiring a change to the use validation machinery (easy if
the PM is implemented sanely).
It also is able to express things that exheres variation can't do as
cleanly; considering build/fetch/post/run/test as the viable dep
targets:
DEPENDENCIES="
build+fetch+post+test:
some-dep"
vs
DEPENDENCIES="!dep:run? ( some-dep )"
I don't much expect that to occur, but the potential exists, thus
mentioning it.
One unstated fault re: DEPENDENCIES btw, is it will not play nice w/
exactly one of blocks. Treating '^^' as "exactly one of", consider:
DEPENDENCIES="
^^ (
run:
cat/blah
build:
cat/dar
cat/foon
)"
Is that a stupid dep? You bet your ass it is.. But it would have to
be explicitly suppressed by the parser for any such construct- moreso,
repoman would have to spot it which is slightly unfun.
Finally, one note; while certain folk have been making lots of noise
about DEPENDENCIES being the best thing since sliced bread, their
isn't much comment about how one actually transitions to it without
making eclass authors who have to support both pre-DEPENDENCIES, and
post-DEPENDENCIES eapis happy; kind of swiss cheeses the hell out of
the code frankly.
A compatibility hack that stacks them is strongly advisable; something
akin to the following:
Literally, we do the following:
inherit() {
if eapi blah; then
local DEPEND PDEPEND RDEPEND
<usual saving/protection of DEPENDENCIES var>
else
<usual saving/protection of DEPEND/PDEPEND/RDEPEND vars>
fi
<normal sourcing machinery>
if eapi blah; then
local _deps=( ) _x
for _x in DEPENDENCIES DEPEND RDEPEND PDEPEND; do
[ -n "${!_x}" ] && deps+=( "${!_x}" )
done
[ ${#deps} -ne 0 ] && DEPENDENCIES="${deps[*]}"
unset DEPEND RDEPEND PDEPEND _x _deps
<normal stacking/restoration of DEPENDENCIES rules>
else
<normal stacking/restoration of RDEPEND/PDEPEND/DEPEND>
fi
}
Via that, we eclasses that are pure DEPENDENCIES eapi wise, just set
the DEPENDENCIES directly; those that have to support multiple eapi's
(aka, every fricking eclass that exists right now) can just use the
old form, shifting into the new form as things progress.
Either way, the dual parsing required for exheres version I'm -1 on;
I'm generally wary of NIH modifications, but the form I've mentioned
that reuses our existing machinery is +.5...ish... from my standpoint
(+1 on the form, just kind of 'meh' on the single var angle despite
mostly agreeing w/ the reasoning).
Either way, on w/ the flaming/insinuations of
idiocy/counter-insinuations of being a wee bit too friendly w/
sheep...
~harring
next prev parent reply other threads:[~2012-09-06 8:12 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-31 20:03 [gentoo-dev] HDEPEND (host dependencies for cross-compilation) for EAPI 5? Zac Medico
2012-08-31 20:39 ` Richard Yao
2012-08-31 20:46 ` Ciaran McCreesh
2012-08-31 21:11 ` Zac Medico
2012-08-31 21:40 ` Fabio Erculiani
2012-08-31 21:50 ` Ciaran McCreesh
2012-08-31 21:58 ` Zac Medico
2012-08-31 22:15 ` Ciaran McCreesh
2012-08-31 22:58 ` Zac Medico
2012-08-31 22:18 ` Fabio Erculiani
2012-08-31 22:59 ` Michał Górny
2012-08-31 23:03 ` Zac Medico
2012-08-31 23:07 ` Ciaran McCreesh
2012-09-01 1:45 ` Zac Medico
2012-09-01 16:00 ` Ciaran McCreesh
2012-09-01 18:15 ` Zac Medico
2012-09-01 18:28 ` Ciaran McCreesh
2012-09-01 7:42 ` Michał Górny
2012-08-31 23:09 ` Ciaran McCreesh
2012-08-31 23:00 ` Michał Górny
2012-08-31 21:53 ` Ciaran McCreesh
2012-08-31 22:16 ` Zac Medico
2012-09-05 0:06 ` Jorge Manuel B. S. Vicetto
2012-09-05 7:19 ` Fabio Erculiani
2012-09-05 7:27 ` Ciaran McCreesh
2012-09-05 10:44 ` Rich Freeman
2012-09-05 11:23 ` Fabio Erculiani
2012-09-05 11:27 ` Ciaran McCreesh
2012-09-05 12:46 ` Rich Freeman
2012-09-05 13:28 ` Alexis Ballier
2012-09-05 15:24 ` Alec Warner
2012-09-05 16:15 ` Michał Górny
2012-09-06 5:58 ` Ciaran McCreesh
2012-09-06 7:39 ` Michał Górny
2012-09-06 8:00 ` Ciaran McCreesh
2012-09-06 8:27 ` Michał Górny
2012-09-06 8:31 ` Ciaran McCreesh
2012-09-06 8:42 ` Michał Górny
2012-09-06 8:11 ` Brian Harring [this message]
2012-09-11 14:13 ` Michał Górny
2012-09-12 4:54 ` Brian Harring
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=20120906081145.GC18495@localhost \
--to=ferringb@gmail.com \
--cc=gentoo-dev@lists.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