public inbox for gentoo-java@lists.gentoo.org
 help / color / mirror / Atom feed
From: Vlastimil Babka <caster@gentoo.org>
To: gentoo-java@lists.gentoo.org
Subject: Re: [gentoo-java] generation-2 java eclass
Date: Sun, 17 Sep 2006 01:40:02 +0200	[thread overview]
Message-ID: <450C8B52.8050707@gentoo.org> (raw)
In-Reply-To: <200609152007.32247.alon.barlev@gmail.com>

Alon Bar-Lev wrote:
> Hello,
>
> Maybe you can help answering some questions I have regarding the
> generation-2  java eclass.
>
> I've seen that in openoffice ebuild there is no call to
> java-pkg-opt-2_pkg_setup fro pkg_setup, the reason is seems to be 
> because it is called automatically.
>
> 1. Is there any documentation regarding portage phase hooks? I could
> not see any reference to this in eclass HOWTO guide.
>   
It's a new feature of portage 2.1. See 
/usr/share/doc/portage-<ver>/NEWS.gz. Not mentioned in eclass HOWTO 
because it's not meant to be used by eclasses, but by users. Java eclass 
is a exception, but we should stop using it when portage is able to save 
env properly between phases (which should already be now IIRC?). It's 
bad thing that now an user can override our phase hooks with 
/etc/portage/bashrc.
> 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...
> 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.
> 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.

Regards,
Vlastimil Babka

-- 
gentoo-java@gentoo.org mailing list



  reply	other threads:[~2006-09-16 23:40 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 [this message]
2006-09-20 10:07   ` Alon Bar-Lev
2006-09-20 20:31     ` Vlastimil Babka
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=450C8B52.8050707@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