1 |
On Sunday 17 September 2006 02:40, Vlastimil Babka wrote: |
2 |
> Alon Bar-Lev wrote: |
3 |
> > Hello, |
4 |
> > |
5 |
> > Maybe you can help answering some questions I have regarding the |
6 |
> > generation-2 java eclass. |
7 |
> > |
8 |
> > I've seen that in openoffice ebuild there is no call to |
9 |
> > java-pkg-opt-2_pkg_setup fro pkg_setup, the reason is seems to be |
10 |
> > because it is called automatically. |
11 |
> > |
12 |
> > 1. Is there any documentation regarding portage phase hooks? I |
13 |
> > could not see any reference to this in eclass HOWTO guide. |
14 |
> |
15 |
> It's a new feature of portage 2.1. See |
16 |
> /usr/share/doc/portage-<ver>/NEWS.gz. Not mentioned in eclass HOWTO |
17 |
> because it's not meant to be used by eclasses, but by users. Java |
18 |
> eclass is a exception, but we should stop using it when portage is |
19 |
> able to save env properly between phases (which should already be |
20 |
> now IIRC?). It's bad thing that now an user can override our phase |
21 |
> hooks with /etc/portage/bashrc. |
22 |
|
23 |
Thanks for explaining that. |
24 |
|
25 |
> > 2. It seems a bit strange that two eclasses can override the same |
26 |
> > function name... How such conflict is resolved? |
27 |
> |
28 |
> Order of inheriting matters, the latter eclass overrides the |
29 |
> former. Ebuild inheriting conflicting eclasses should then override |
30 |
> the function itself and call the functions of both eclasses from |
31 |
> there. Now if there was a repoman check for that... |
32 |
|
33 |
Right... But since, as you said, the elcass should not use the pre |
34 |
stuff, it should not be a problem. |
35 |
|
36 |
> > 3. Looking at java-pkg-2.eclass I see function name |
37 |
> > pre_pkg-2_setup, shouldn't it be pre_pkg_setup? I see that |
38 |
> > pre_pkg_setup is specified in java-pkg-opt-2.eclass... Why is |
39 |
> > there a difference? |
40 |
> |
41 |
> Must be a typo. As a result, java env is probably not set properly |
42 |
> inside ebuild's pkg_setup() (for ebuilds that define it). But since |
43 |
> there are correct hooks for other phases (especially src_compile) |
44 |
> it didn't cause any harm so far. |
45 |
|
46 |
Should I open a bug for it, or you can fix it? |
47 |
|
48 |
> > 4. Can you please fix the documentation of java development and |
49 |
> > on the eclass it-self so that there will be a comment that the |
50 |
> > unlike other eclasses, java-pkg*-2_pkg_setup should not be called |
51 |
> > from pkg_setup? |
52 |
> |
53 |
> Well, since the usage of phase hooks is only a workaround (not |
54 |
> meant to free ebuild writer from calling java-pkg*-2_pkg_setup, |
55 |
> that's just a consequence) I would say it's better to document that |
56 |
> it should be called from ebuild explicitly, so when we stop using |
57 |
> the phase hooks (and maybe it's time already?), number of ebuilds |
58 |
> won't get broken instantly. |
59 |
|
60 |
Right, I think so too. |
61 |
So people should be told to call the pkg_setup. |
62 |
|
63 |
For example openoffice ebuild removed the call to |
64 |
java-pkg*-2_pkg_setup since it is already called. |
65 |
History is on bug#139340. |
66 |
|
67 |
Best Regards, |
68 |
Alon Bar-Lev. |
69 |
-- |
70 |
gentoo-java@g.o mailing list |