From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1G7UI7-0004zl-2q for garchives@archives.gentoo.org; Mon, 31 Jul 2006 09:42:27 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.7/8.13.6) with SMTP id k6V9fmAg003037; Mon, 31 Jul 2006 09:41:48 GMT Received: from slimak.dkm.cz (slimak.dkm.cz [62.24.64.34]) by robin.gentoo.org (8.13.7/8.13.6) with SMTP id k6V9fktJ001242 for ; Mon, 31 Jul 2006 09:41:47 GMT Received: (qmail 78916 invoked by uid 0); 31 Jul 2006 09:41:45 -0000 Received: from r141.chello.upc.cz (HELO ?192.168.1.1?) (62.24.83.141) by slimak.dkm.cz with SMTP; 31 Jul 2006 09:41:45 -0000 Message-ID: <44CDD058.7090803@seznam.cz> Date: Mon, 31 Jul 2006 11:41:44 +0200 From: Caster User-Agent: Thunderbird 1.5.0.5 (X11/20060729) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-java@gentoo.org MIME-Version: 1.0 To: gentoo-java@lists.gentoo.org Subject: [gentoo-java] java-check-environment patch References: <44C9F1C8.6080101@gmail.com> In-Reply-To: <44C9F1C8.6080101@gmail.com> Content-Type: multipart/mixed; boundary="------------030701040003030408060705" X-Archives-Salt: f2dfd113-fdff-4d8f-a72c-5128f41df838 X-Archives-Hash: d0669db16fece7a68a9c71b7b1f0557f This is a multi-part message in MIME format. --------------030701040003030408060705 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit An user on IRC had problems emerging anything that was using gen-1 system. Turned out to be missing lines GENERATION and VMHANDLE in /etc/env.d/20java because it wasn't recreated after migration, but java-check-environment wasn't catching this. So here's a patch that will make it check for GENERATION in that file too. Caster --------------030701040003030408060705 Content-Type: text/x-patch; name="java-check-environment.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="java-check-environment.patch" --- /usr/bin/java-check-environment 2006-07-29 00:56:52.000000000 +0200 +++ java-check-environment 2006-07-31 11:31:00.000000000 +0200 @@ -167,8 +167,9 @@ # Checks that a system-vm for generation-1 is set check_generation_1_system_vm() { local this_result=0 + local env="/etc/env.d/20java" # Make sure a generation-1 VM is set - if [[ ! -f /etc/env.d/20java ]]; then + if [[ ! -f "${env}" ]]; then qeerror "No Generation-1 System VM is set!" qeerror "Run 'java-config-1 -L' to see a list of available VMs" qeerror "Then run 'java-config-1 -S '" @@ -178,8 +179,21 @@ qeerror "Run 'java-config-1 -L' to see a list of available VMs" qeerror "Then run 'java-config-1 -S '" this_result=1 + # Make sure the generation-1 VM set is generation-2 compatible, not set long before migration + else + # We need to unset GENERATION, because this ends up being in + # the environment. + local OLD_GENERATION=${GENERATION} + unset GENERATION + local generation=$(source ${env}; echo $GENERATION) + if [[ "${generation}z" != "2z" ]]; then + qeerror "Current Generation-1 System VM env isn't Generation-2 ready and needs to be set again" + qeerror "Run 'java-config-1 -L' to see a list of available VMs" + qeerror "Then run 'java-config-1 -S '" + this_result=1 + fi + GENERATION=${OLD_GENERATION} fi - update_result ${this_result} return ${this_result} --------------030701040003030408060705-- -- gentoo-java@gentoo.org mailing list