From owner-freebsd-java@FreeBSD.ORG Fri Oct 26 04:37:12 2012 Return-Path: Delivered-To: java@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 73549E7A; Fri, 26 Oct 2012 04:37:12 +0000 (UTC) (envelope-from glewis@eyesbeyond.com) Received: from misty.eyesbeyond.com (gerbercreations.com [71.39.140.16]) by mx1.freebsd.org (Postfix) with ESMTP id 1FD498FC08; Fri, 26 Oct 2012 04:37:11 +0000 (UTC) Received: from misty.eyesbeyond.com (localhost.eyesbeyond.com [127.0.0.1]) by misty.eyesbeyond.com (8.14.5/8.14.5) with ESMTP id q9Q4b5F6091042; Thu, 25 Oct 2012 21:37:05 -0700 (PDT) (envelope-from glewis@eyesbeyond.com) Received: (from glewis@localhost) by misty.eyesbeyond.com (8.14.5/8.14.5/Submit) id q9Q4b5TC091041; Thu, 25 Oct 2012 21:37:05 -0700 (PDT) (envelope-from glewis@eyesbeyond.com) X-Authentication-Warning: misty.eyesbeyond.com: glewis set sender to glewis@eyesbeyond.com using -f Date: Thu, 25 Oct 2012 21:37:05 -0700 From: Greg Lewis To: Jung-uk Kim Subject: Re: [ports-i386@FreeBSD.org: openjdk6-jre-b26_1 pkg-plist errors on i386 9] Message-ID: <20121026043704.GA90964@misty.eyesbeyond.com> References: <20121025105934.GN4474@droso.net> <5089B928.2090504@FreeBSD.org> <5089D4B7.9050603@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5089D4B7.9050603@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: java@FreeBSD.org, Erwin Lansing X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Oct 2012 04:37:12 -0000 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