From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1GOjlb-0003FB-61 for garchives@archives.gentoo.org; Sat, 16 Sep 2006 23:40:11 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.8/8.13.6) with SMTP id k8GNe0tt016305; Sat, 16 Sep 2006 23:40:00 GMT Received: from services.kabel1.cz (services.kabel1.cz [82.100.16.2]) by robin.gentoo.org (8.13.8/8.13.6) with ESMTP id k8GNdxjx031707 for ; Sat, 16 Sep 2006 23:40:00 GMT Received: from [10.1.31.28] ([10.1.31.28]) by services.kabel1.cz (8.13.7/8.13.6) with ESMTP id k8GNdxkH028028 for ; Sun, 17 Sep 2006 01:39:59 +0200 Message-ID: <450C8B52.8050707@gentoo.org> Date: Sun, 17 Sep 2006 01:40:02 +0200 From: Vlastimil Babka User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-java@gentoo.org MIME-Version: 1.0 To: gentoo-java@lists.gentoo.org Subject: Re: [gentoo-java] generation-2 java eclass References: <200609152007.32247.alon.barlev@gmail.com> In-Reply-To: <200609152007.32247.alon.barlev@gmail.com> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.54 on 82.100.16.2 X-Archives-Salt: 99e32bda-ed4b-4660-8e87-9f56104e4010 X-Archives-Hash: f76e1a0e84d94601abc902fceb76699c 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-/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