1 |
On Tue, 1 Apr 2014 15:31:56 -0700 |
2 |
Tim Harder <radhermit@g.o> wrote: |
3 |
|
4 |
> Currently the java-utils-2 eclass refers to $DESTTREE in the |
5 |
> java-pkg_init_paths_ function that gets run during pkg_setup (via the |
6 |
> java-pkg-2 eclass that calls java-pkg_init). The java-pkg_init_paths_ |
7 |
> function also gets called again for most src_install java-utils-2 |
8 |
> eclass functions that use the related variables but the current |
9 |
> implementation doesn't allow the variables to be reset. |
10 |
> |
11 |
> This is an issue for pkg managers that try to follow the spec and |
12 |
> don't define DESTTREE outside of src_install. Note that DESTTREE was |
13 |
> recently added to pms so you'll probably have to view the live |
14 |
> version to see the DESTTREE related info. |
15 |
> |
16 |
> The attached patch fixes the situation by adding java-pkg_init_paths_ |
17 |
> calls to a couple src_install related functions that use the related |
18 |
> variables and removes the call to it during pkg_setup (no related |
19 |
> variables appear to be used before src_install but I could be missing |
20 |
> something). People familiar with various java pkgs should test it to |
21 |
> make sure those variables aren't used before src_install. |
22 |
> |
23 |
> Thoughts or comments welcome, |
24 |
> Tim |
25 |
|
26 |
Tim, |
27 |
|
28 |
java-utils-2 does it like that since before PMS, since around the time |
29 |
Portage gained support for EAPIs. PMS leaves it open whether using |
30 |
DESTREE in pkg_setup is allowed or not. Neither Portage, Paludis nor |
31 |
earlier version of Pkgcore did mind this use. Well, one could argue |
32 |
that using DESTREE in pkg_setup is allowed. |
33 |
|
34 |
I would welcome PMS clearly defining the scope of DESTREE and the most |
35 |
logical choice of course would be src_install only where it is |
36 |
currently explicitly required. |
37 |
|
38 |
If we fix java-utils-2 we should fix PMS as well. After all, |
39 |
java-utils-2 is a prime suspect for the different handling of |
40 |
DESTREE and for instance INSDESTREE in PMS. This asymmetry is why I |
41 |
didn't touch java-utils-2 when I looked into exactly this usage of |
42 |
DESTREE 2+ years ago. |
43 |
|
44 |
Ralph |