From: Vlastimil Babka <caster@gentoo.org>
To: gentoo-java@lists.gentoo.org
Subject: Re: [gentoo-java] generation-2 java eclass
Date: Wed, 20 Sep 2006 22:31:39 +0200 [thread overview]
Message-ID: <4511A52B.2010700@gentoo.org> (raw)
In-Reply-To: <200609201307.51119.alon.barlev@gmail.com>
Alon Bar-Lev wrote:
> Thanks for explaining that.
>
>>> 2. It seems a bit strange that two eclasses can override the same
>>> function name... How such conflict is resolved?
>> Order of inheriting matters, the latter eclass overrides the
>> former. Ebuild inheriting conflicting eclasses should then override
>> the function itself and call the functions of both eclasses from
>> there. Now if there was a repoman check for that...
>
> Right... But since, as you said, the elcass should not use the pre
> stuff, it should not be a problem.
Maybe you're confusing pre_hooks with usual function overriding done via
EXPORT_FUNCTIONS (see eclass howto). I just explained the EXPORT
overriding. For conflicting pre_hooks, I was only told that user defined
hook beats eclass.
>>> 3. Looking at java-pkg-2.eclass I see function name
>>> pre_pkg-2_setup, shouldn't it be pre_pkg_setup? I see that
>>> pre_pkg_setup is specified in java-pkg-opt-2.eclass... Why is
>>> there a difference?
>> Must be a typo. As a result, java env is probably not set properly
>> inside ebuild's pkg_setup() (for ebuilds that define it). But since
>> there are correct hooks for other phases (especially src_compile)
>> it didn't cause any harm so far.
>
> Should I open a bug for it, or you can fix it?
I can fix it but I just found out that portage seems to ignore
pre_pkg_setup() hook anyway. Will need to talk to portage people if
that's feature or bug.
>
>>> 4. Can you please fix the documentation of java development and
>>> on the eclass it-self so that there will be a comment that the
>>> unlike other eclasses, java-pkg*-2_pkg_setup should not be called
>>> from pkg_setup?
>> Well, since the usage of phase hooks is only a workaround (not
>> meant to free ebuild writer from calling java-pkg*-2_pkg_setup,
>> that's just a consequence) I would say it's better to document that
>> it should be called from ebuild explicitly, so when we stop using
>> the phase hooks (and maybe it's time already?), number of ebuilds
>> won't get broken instantly.
>
> Right, I think so too.
> So people should be told to call the pkg_setup.
>
> For example openoffice ebuild removed the call to
> java-pkg*-2_pkg_setup since it is already called.
> History is on bug#139340.
>
For now we decided to rely on the phase hooks (as nichoj told me), so no
need to call pkg_setup. The hooks behaviour in portage can even change
so that they will stack and not override, means we might stay with them.
Not decided yet, so no rush to go fix ebuilds that work with current setup.
--
Vlastimil Babka (Caster)
Gentoo/Java
--
gentoo-java@gentoo.org mailing list
next prev parent reply other threads:[~2006-09-20 20:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-15 17:07 [gentoo-java] generation-2 java eclass Alon Bar-Lev
2006-09-16 23:40 ` Vlastimil Babka
2006-09-20 10:07 ` Alon Bar-Lev
2006-09-20 20:31 ` Vlastimil Babka [this message]
2006-09-20 22:41 ` Vlastimil Babka
2006-09-21 5:05 ` Alon Bar-Lev
2006-09-21 15:42 ` William L. Thomson Jr.
2006-09-21 16:55 ` Alon Bar-Lev
[not found] ` <4512C781.7000709@serent.com>
2006-09-21 17:24 ` Kurt Guenther
2006-09-21 17:34 ` William L. Thomson Jr.
2006-09-21 17:58 ` Vlastimil Babka
2006-09-21 18:04 ` Alon Bar-Lev
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=4511A52B.2010700@gentoo.org \
--to=caster@gentoo.org \
--cc=gentoo-java@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