Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 09 Aug 2007 12:41:06 -0400
From:      Robert Noland <rnoland@2hip.net>
To:        Greg Lewis <glewis@eyesbeyond.com>
Cc:        ports@FreeBSD.org, RW <fbsd06@mlists.homeunix.com>, glewis@FreeBSD.org, Doug Barton <dougb@FreeBSD.org>
Subject:   Re: Portmaster and Portmanager problem with jdk15
Message-ID:  <1186677666.76028.28.camel@rnoland-ibm.acs.internap.com>
In-Reply-To: <20070809154758.GA42925@misty.eyesbeyond.com>
References:  <20070807205138.6c5759d6@gumby.homeunix.com.> <46B8D605.2060008@FreeBSD.org> <1186520349.1257.58.camel@rnoland-ibm.acs.internap.com> <20070809154758.GA42925@misty.eyesbeyond.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--=-ywwdh4LhOjACC7SRPDag
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Thu, 2007-08-09 at 09:47 -0600, Greg Lewis wrote:
> 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) insta=
ll
> > > > 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.
> > > >=20
> > > > 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:
> > > >=20
> > > > # if no valid jdk found, set dependency
> > > > .if !defined(BOOTSTRAPJDKDIR)
> > > > BOOTSTRAPJDKDIR?=3D${LOCALBASE}/linux-sun-jdk${SUN_LINUX_JDK_VERSIO=
N}=20
> > > > .endif
> > > > BUILD_DEPENDS+=3D${BOOTSTRAPJDKDIR}/bin/javac:${PORTSDIR}/java/linu=
x-sun-jdk15
> > > >=20
> > > >=20
> > > > I don't know why this causes the build-tools to install
> > > > linux-sun-jdk15, but simply moving the BUILD_DEPENDS+=3D line insid=
e the
> > > > if-endif block, seems to fix the problem. That line is only needed =
if
> > > > no jdk is present.
> > >=20
> > > Your analysis sounds right.
> >=20
> > 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.
>=20
> 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 ha=
s
> 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.

As it stands, the jdk14 and jdk15 ports register a static dependency on
the default bootstrap unconditionally.  Portmanager ( I assume
portmaster behave similarly ) parses the Makefiles for all installed
ports so that it can take environment settings and options into account
and then handles the building of each port separately.  In the case of
the jdk ports, it always sees a dependency on the default bootstrap.
This means that the default bootstrap must be installed and current
before it will update the jdk ports, even if it is a rebuild which may
be bootstrapped by itself.

The proposed patch above, does resolve this issue, however it doesn't
allow for an accurate dependency registration of the bootstrap that was
actually used to build the port.  In the case of jdk14 this is fine
because only two possible bootstraps exist, linux or itself.  For jdk15,
where five possible bootstraps exist we may not accurately record the
bootstrap that was used for the build.  Since diablo is the highest
priority bootstrap for jdk15, if it is installed it will be used in
preference of all others, but no dependency would be registered on it.

robert.
=20

--=-ywwdh4LhOjACC7SRPDag
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (FreeBSD)

iD8DBQBGu0OiM4TrQ4qfROMRAt9YAJ9pksK9hX7k5zthPdWjc7W1GfYsnQCfdU4p
jkxZaZPW2wBLb9FusEK5ITI=
=qGeH
-----END PGP SIGNATURE-----

--=-ywwdh4LhOjACC7SRPDag--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1186677666.76028.28.camel>