diff options
author | Alistair Bush <ali_bush@gentoo.org> | 2009-06-08 09:51:25 +0000 |
---|---|---|
committer | Alistair Bush <ali_bush@gentoo.org> | 2009-06-08 09:51:25 +0000 |
commit | 2205057b9dd44073eb31191e8e7ac1e19fbdb15e (patch) | |
tree | 8ee635559131de0da1b39230179c15f3d3e30067 /src/java-config-2 | |
parent | Updated version (diff) | |
download | java-config-2205057b9dd44073eb31191e8e7ac1e19fbdb15e.tar.gz java-config-2205057b9dd44073eb31191e8e7ac1e19fbdb15e.tar.bz2 java-config-2205057b9dd44073eb31191e8e7ac1e19fbdb15e.zip |
Add support for build only vm's and remove support for old style virtual support.
svn path=/projects/java-config-2/trunk/; revision=7809
Diffstat (limited to 'src/java-config-2')
-rwxr-xr-x | src/java-config-2 | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/java-config-2 b/src/java-config-2 index fe7a2ce..a2a4d09 100755 --- a/src/java-config-2 +++ b/src/java-config-2 @@ -142,10 +142,11 @@ def list_available_vms(option, opt, value, parser): printer._print('%HThe following VMs are available for generation-2:%$') for i, vm in vm_list.iteritems(): - if vm is active: - printer._print('%G' + '*)\t%s [%s]%s' % (vm.query('VERSION'), vm.name(), '%$')) - else: - printer._print('%i)\t%s [%s]' % (i, vm.query('VERSION'), vm.name())) + if not vm.is_build_only(): + if vm is active: + printer._print('%G' + '*)\t%s [%s]%s' % (vm.query('VERSION'), vm.name(), '%$')) + else: + printer._print('%i)\t%s [%s]' % (i, vm.query('VERSION'), vm.name())) def print_environment(option, opt, value, parser): vm = manager.get_vm(value) @@ -164,6 +165,9 @@ def set_system_vm(option, opt, value, parser): try: manager.set_system_vm(vm) printer._print("Now using %s as your generation-2 system JVM" % (vm) ) + if vm.is_build_only(): + printer._printWarning("%s is marked as a build-only JVM. Using this vm is not recommended. " % (vm)) + printer._printWarning("Please see http://www.gentoo.org/doc/en/java.xml#build-only for more information.") except PermissionError: fatalError("You do not have enough permissions to set the system VM!") except EnvironmentUndefinedError: @@ -185,6 +189,9 @@ def set_user_vm(option, opt, value, parser): try: manager.set_user_vm(vm) printer._print("Now using %s as your user JVM" % (vm)) + if vm.is_build_only(): + printer._printWarning("%s is marked as a build-only JVM. Using this vm is not recommended. " % (vm)) + printer._printWarning("Please see http://www.gentoo.org/doc/en/java.xml#build-only for more information.") except PermissionError: fatalError("You do not have enough permissions to set the VM!") except InvalidConfigError, e: |