Currently the java-utils-2 eclass refers to $DESTTREE in the java-pkg_init_paths_ function that gets run during pkg_setup (via the java-pkg-2 eclass that calls java-pkg_init). The java-pkg_init_paths_ function also gets called again for most src_install java-utils-2 eclass functions that use the related variables but the current implementation doesn't allow the variables to be reset.
This is an issue for pkg managers that try to follow the spec and don't define DESTTREE outside of src_install. Note that DESTTREE was recently added to pms so you'll probably have to view the live version to see the DESTTREE related info. The attached patch fixes the situation by adding java-pkg_init_paths_ calls to a couple src_install related functions that use the related variables and removes the call to it during pkg_setup (no related variables appear to be used before src_install but I could be missing something). People familiar with various java pkgs should test it to make sure those variables aren't used before src_install. Thoughts or comments welcome, Tim
--- java-utils-2.eclass +++ java-utils-2.eclass @@ -192,6 +192,7 @@ [[ ${#} -lt 1 ]] && die "At least one argument needed" java-pkg_check-phase install + java-pkg_init_paths_ local dest=/usr/share/doc/${PF}/examples if [[ ${1} == --subdir ]]; then @@ -543,6 +544,7 @@ # QA checks java-pkg_check-phase install + java-pkg_init_paths_ [[ -z "${dir}" ]] && die "Must specify a directory!" [[ ! -d "${dir}" ]] && die "${dir} does not exist, or isn't a directory!" @@ -2060,7 +2062,6 @@ java-pkg_announce-qa-violation "Using old ant_src_unpack. Should be src_unpack" fi - java-pkg_init_paths_ java-pkg_switch-vm PATH=${JAVA_HOME}/bin:${PATH}
pgp5lx1_7XasF.pgp
Description: PGP signature