Portmaster and Portmanager problem with jdk15

Greg Lewis glewis at eyesbeyond.com
Thu Aug 9 08:48:00 PDT 2007


On Tue, Aug 07, 2007 at 04:59:09PM -0400, Robert Noland wrote:
> On Tue, 2007-08-07 at 13:28 -0700, Doug Barton wrote:
> > RW wrote:
> > > Both Portmaster and Portmanager (I haven't tried Portupgrade) install
> > > java/linux-sun-jdk15 on an upgrade of java/jdk15. If I upgrade
> > > jdk15 manually it isn't built, so it must be done by the tools.
> > > 
> > > The way the jdk15 makefile works is that it looks for the location
> > > of an existing jdk installation for bootstrapping and sets
> > > BOOTSTRAPJDKDIR accordingly. We then have:
> > > 
> > > # if no valid jdk found, set dependency
> > > .if !defined(BOOTSTRAPJDKDIR)
> > > BOOTSTRAPJDKDIR?=${LOCALBASE}/linux-sun-jdk${SUN_LINUX_JDK_VERSION} 
> > > .endif
> > > BUILD_DEPENDS+=${BOOTSTRAPJDKDIR}/bin/javac:${PORTSDIR}/java/linux-sun-jdk15
> > > 
> > > 
> > > I don't know why this causes the build-tools to install
> > > linux-sun-jdk15, but simply moving the BUILD_DEPENDS+= line inside the
> > > if-endif block, seems to fix the problem. That line is only needed if
> > > no jdk is present.
> > 
> > Your analysis sounds right.
> 
> Almost, doing this will remove the dependency on linux-sun-jdk15 if
> another bootstrap is installed, but it won't add one for the installed
> bootstrap.  Currently, it will always have a dependency on
> linux-sun-jdk15 even if another bootstrap jdk is installed.  jdk14 also
> has this issue.

So, while the dependency being generated is bogus, I'm not quite sure why
its having the effect that you mention.  The port is trying to figure out
which bootstrap it should use out of a list of candidates and, when it has
figured this out, create a "dependency" on it.  The dependency is (often)
bogus, but that shouldn't actually have the effect your seeing as I
understand it.  In the case where the bootstrap already exists, the
dependency shouldn't be installed as I understand it since the check for
that path will succeed, unless portmaster and portmanager decide to do
their own proactive installation of dependencies based on the port?  In
the case where the bootstrap doesn't exist then the dependency will be
the correct default bootstrap and should be installed.

-- 
Greg Lewis                          Email   : glewis at eyesbeyond.com
Eyes Beyond                         Web     : http://www.eyesbeyond.com
Information Technology              FreeBSD : glewis at FreeBSD.org


More information about the freebsd-ports mailing list