Subject: Re: devel/apache-ant problem
To: None <>
From: Antoine Reilles <>
List: tech-pkg
Date: 12/21/2005 00:27:51
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Dec 14, 2005 at 09:31:33AM -0700, wrote:
> Antoine Reilles writes:
>  > > The problem is that there is no $PREFIX/bin/java installed by java,
>  > > and so the program fails.
>  > It should be provided by pkg_alternatives
> Thank you.  This is indeed the problem.  Installing
> pkgtools/pkg_alternatives solves it.
but there is still a problem if pkg_alternatives is not installed
>  > pkg_alternatives should be installed as soon as you install a package
>  > providing an alternative, and i counted on that for apache-ant.
> As far as I can see, this is not the case.  For example, installing
> one of the java packages does not automatically install
> pkgtools/pkg_alternatives.  Consequently, downstream packages (e.g.,
> apache-ant) fail.
Maybe jmmv can say more about this: should each package providing
alternatives require pkg_alternatives is installed ? I'm not sure it
would be a good thing. Also, it is better not to use alternatives
wrapper from within a package, since the user may change the behavior,
creating strange behaviors (like using apache-ant with unmatched vm and
classpath). That way apache-ant was wrong.
> This suggests that pkgtools/pkg_alternatives is an absolute
> prerequisite for at least some packages to work correctly.  I am not
> sure what the best solution is, but it strikes me that this is an area
> in need of improvement, not by addressing specific packages (like
> apache-ant) but by providing a generic solution.
If pkg_altenratives may not be used from within packages, then the
apache-ant package needs a way to know where the java program is.
using ${JAVA_HOME}/bin/java is not enough, since some packages installs
their java vm with another name, e.g. sablevm.

I propose adding a JAVABIN variable in mk/, and set it to the
correct value there, to be used in other packages installing scripts
calling java.


Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.4.2 (Darwin)