Date: Thu, 25 Oct 2012 21:37:05 -0700 From: Greg Lewis <glewis@eyesbeyond.com> To: Jung-uk Kim <jkim@FreeBSD.org> Cc: java@FreeBSD.org, Erwin Lansing <erwin@FreeBSD.org> Subject: Re: [ports-i386@FreeBSD.org: openjdk6-jre-b26_1 pkg-plist errors on i386 9] Message-ID: <20121026043704.GA90964@misty.eyesbeyond.com> In-Reply-To: <5089D4B7.9050603@FreeBSD.org> References: <20121025105934.GN4474@droso.net> <5089B928.2090504@FreeBSD.org> <5089D4B7.9050603@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
G'day Jung-uk, On Thu, Oct 25, 2012 at 08:09:27PM -0400, Jung-uk Kim wrote: > On 2012-10-25 18:11:52 -0400, Jung-uk Kim wrote: > > On 2012-10-25 06:59:34 -0400, Erwin Lansing wrote: > > > >> FYI; can you please investigate and/or report to the developers? > >> If you are already aware of this problem but do not yet have a > >> fix, please mark the port BROKEN in the appropriate case, so > >> that users do not unexpectedly encounter it. > > > >> See http://pointyhat.freebsd.org for the full log. > > > > Actually, this is (arguably) a bug for javavmwrapper. Its > > installation script searches for JDK/JREs under ${PREFIX} and > > registers them all without an exception. That means you cannot > > have a package containing ${PREFIX}/*j{dk|re}*/bin/java without > > explicitly registering javavmwrapper as dependency. I think we > > should get rid of this "feature" or de-installation script must > > remove /usr/local/etc/javavms. I don't regard this as a bug at all. When javavmwrapper is being reinstalled it must figure out what all of the available JVMs are and register them. Maintaining lists of all of them is fragile, so instead it liberally looks for all the possible VMs that might be available and registers them to itself. > > I'll add javavmwrapper as a dependency for bootstrap-openjdk for > > now. This isn't the right answer. Unless I'm mistaken bootstrap-openjdk isn't a fully functional JDK and should never be registered with javavmwrapper. > Actually it triggered another bug, i.e., stale symlinks. :-( > > https://redports.org/~jkim@FreeBSD.org/20121025222400-65315-93464/bootstrap-openjdk-r306294_1.log > > Now we really have to fix the root cause. Here is my suggestion: > > http://people.freebsd.org/~jkim/javavmwrapper.diff To me, that's a bandaid rather than a fix. Here are my two suggestions: 1. Don't actually make bootstrap-openjdk a port. There is no reason for it to be on the system once its done its job of bootstrapping the build, so why not just make it a distfile for the ports that will use it to bootstrap? They can unpack it in $WRKDIR and set the bootstrap path accordingly. 2. Make a change to javavmwrapper's pkg-install script to ignore bootstrap JDKs. That way it never registers it (which is the right thing to do) and there is no clean up to do. Something like this should do it: Index: files/pkg-install.in =================================================================== --- files/pkg-install.in (revision 306295) +++ files/pkg-install.in (working copy) @@ -21,7 +21,7 @@ fi # Ensure all JDKs and JREs are installed -for jvm in "${LOCALBASE}"/*jdk* "${LOCALBASE}"/*jre*; do +for jvm in `ls "${LOCALBASE}"/*jdk* "${LOCALBASE}"/*jre* | grep -v bootstrap`; do if [ -x "${jvm}/bin/java" ]; then "${PKG_PREFIX}"/bin/registervm "${jvm}/bin/java" > /dev/null 2>&1 fi I should likely do something clever with IFS there in case ${LOCALBASE} has a space in it. -- Greg Lewis Email : glewis@eyesbeyond.com Eyes Beyond Web : http://www.eyesbeyond.com Information Technology FreeBSD : glewis@FreeBSD.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121026043704.GA90964>