From: Caster <cast3r@seznam.cz>
To: gentoo-java@lists.gentoo.org
Subject: [gentoo-java] java-check-environment patch
Date: Mon, 31 Jul 2006 11:41:44 +0200 [thread overview]
Message-ID: <44CDD058.7090803@seznam.cz> (raw)
In-Reply-To: <44C9F1C8.6080101@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 328 bytes --]
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
[-- Attachment #2: java-check-environment.patch --]
[-- Type: text/x-patch, Size: 1438 bytes --]
--- /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 <VM choice>'"
@@ -178,8 +179,21 @@
qeerror "Run 'java-config-1 -L' to see a list of available VMs"
qeerror "Then run 'java-config-1 -S <VM choice>'"
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 <VM choice>'"
+ this_result=1
+ fi
+ GENERATION=${OLD_GENERATION}
fi
-
update_result ${this_result}
return ${this_result}
prev parent reply other threads:[~2006-07-31 9:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-28 11:15 [gentoo-java] JNI and java versions Alistair Bush
2006-07-28 19:10 ` David Herron
2006-07-29 12:39 ` [gentoo-java] " Alistair Bush
2006-07-29 15:21 ` Joshua Nichols
2006-07-31 9:41 ` Caster [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44CDD058.7090803@seznam.cz \
--to=cast3r@seznam.cz \
--cc=gentoo-java@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox