On 10/19/15 3:12 AM, Alexis Ballier wrote:
On Sun, 18 Oct 2015 12:17:58 +0200
Ulrich Mueller <[email protected]> wrote:
On Sun, 18 Oct 2015, Michał Górny wrote:
On Sun, 18 Oct 2015 11:54:40 +0200
Ulrich Mueller <[email protected]> wrote:
So the question is if we should add a sentence like the following
to the spec:
In EAPIs where it is supported, all ebuilds must run
\t{eapply\_user} in the \t{src\_prepare} phase.
How about:
In EAPIs listed in table blah blah blah, \t{eapply\_user} must
be called exactly once in the \t{src\_prepare} phase.
Which emphasizes that eclass or default may do it instead of
ebuild.
Yeah, that's better actually. We need not reference the table again
though, since we do it in the sentence before.
In EAPIs where it is supported, \t{eapply\_user} must be called
exactly once in the \t{src\_prepare} phase.
+1
But there is something important we've overlooked: should eclasses that
export src_prepare call eapply_user ? I think yes, otherwise they'd
make packages inheriting them violate the 'at least once rule'.
Now, what about the not so uncommon case of a package inheriting eclass1
& eclass2 both exporting src_prepare? this package would define:
src_prepare() {
eclass1-src_prepare
eclass2-src_prepare
}
but then it would violate the 'call eapply_user at most once' rule...
sadly, I can't come up with a solution there...
Why can't you just do something like this in the implementation of
eapply_user()? I must be missing some subtle point.
foo() {
if [[ -z $DONE ]]; then
DONE="all done"
echo "in foo"
fi
}
--
Anthony G. Basile, Ph.D.
Gentoo Linux Developer [Hardened]
E-Mail : [email protected]
GnuPG FP : 1FED FAD9 D82C 52A5 3BAB DC79 9384 FA6E F52D 4BBA
GnuPG ID : F52D4BBA