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 1GPz1l-0001y0-PK for garchives@archives.gentoo.org; Wed, 20 Sep 2006 10:10:02 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.8/8.13.6) with SMTP id k8KA9Lje032389; Wed, 20 Sep 2006 10:09:21 GMT Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.187]) by robin.gentoo.org (8.13.8/8.13.6) with ESMTP id k8KA9Kh8007035 for ; Wed, 20 Sep 2006 10:09:20 GMT Received: by nf-out-0910.google.com with SMTP id p46so548594nfa for ; Wed, 20 Sep 2006 03:09:20 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:from:to:subject:date:user-agent:cc:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=gvRgDtz0/UL9vLxDhY16klTNS0pysdcpGbO40JtTcxqONGFkCNlZEXsROMNzcmLVZFha2GfkClRE0xuqik7z9CJ02zoc9bQi4FrvYDQQCVRcXywidi+Y4U0HOYgZU33GnJY42/fZGUbChqZp95wb+2lAvq7ugWF9OhIwLwqy6hY= Received: by 10.78.157.8 with SMTP id f8mr4338818hue; Wed, 20 Sep 2006 03:09:19 -0700 (PDT) Received: from ?10.195.4.232? ( [192.118.11.120]) by mx.gmail.com with ESMTP id 37sm553146hub.2006.09.20.03.09.10; Wed, 20 Sep 2006 03:09:19 -0700 (PDT) From: Alon Bar-Lev To: gentoo-java@lists.gentoo.org, Vlastimil Babka Subject: Re: [gentoo-java] generation-2 java eclass Date: Wed, 20 Sep 2006 13:07:50 +0300 User-Agent: KMail/1.9.4 Cc: Daniel Drake , Andreas Proschofsky References: <200609152007.32247.alon.barlev@gmail.com> <450C8B52.8050707@gentoo.org> In-Reply-To: <450C8B52.8050707@gentoo.org> 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 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200609201307.51119.alon.barlev@gmail.com> X-Archives-Salt: 0a0a4cdc-d48c-4547-b989-c3ec3ffbc8d0 X-Archives-Hash: b0b1b33e91e4a7f279932ca82a418c55 On Sunday 17 September 2006 02:40, Vlastimil Babka wrote: > 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. 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. > > 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? > > 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. Best Regards, Alon Bar-Lev. -- gentoo-java@gentoo.org mailing list