/[gentoo-x86]/eclass/java-vm-2.eclass
Gentoo

Diff of /eclass/java-vm-2.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.4 Revision 1.8
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2004 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.4 2006/06/30 15:00:07 nichoj Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.8 2006/08/31 01:03:11 nichoj Exp $
4# 4#
5# Author: Karl Trygve Kalleberg <karltk@gentoo.org> 5# Author: Karl Trygve Kalleberg <karltk@gentoo.org>
6 6
7inherit eutils 7inherit eutils
8 8
32 if [[ -z "$(java-config-2 -f)" ]]; then 32 if [[ -z "$(java-config-2 -f)" ]]; then
33 java_set_default_vm_ 33 java_set_default_vm_
34 fi 34 fi
35 35
36 if [[ ${JAVA_VM_NO_GENERATION1} != "true" ]]; then 36 if [[ ${JAVA_VM_NO_GENERATION1} != "true" ]]; then
37 local systemvm1="$(java-config-1 -f)" 37 local systemvm1="$(java-config-1 -f 2>/dev/null)"
38 # no generation-1 system-vm was yet set 38 # no generation-1 system-vm was yet set
39 if [[ -z "${systemvm1}" ]]; then 39 if [[ -z "${systemvm1}" ]]; then
40 einfo "No valid generation-1 system-vm set, setting to ${P}" 40 # if 20java exists, must be using old VM
41 if [[ -f /etc/env.d/20java ]]; then
42 ewarn "The current generation-1 system-vm is using an out-of-date VM,"
43 ewarn "as in, it hasn't been updated for use with the new Java sytem."
44 # othewise, it must not have been set before
45 else
46 ewarn "No generation-1 system-vm previously set."
47 fi
48 ewarn "Setting generation-1 system-vm to ${VMHANDLE}"
41 java-config-1 --set-system-vm=${P} 49 java-config-1 --set-system-vm=${P} 2>/dev/null
42 # dirty check to see if we are upgrading current generation-1 system vm 50 # dirty check to see if we are upgrading current generation-1 system vm
43 elif [[ ${systemvm1} =~ "^${VMHANDLE}" ]]; then 51 elif [[ "${systemvm1}" = ${VMHANDLE}* ]]; then
44 einfo "Upgrading generation-1 system-vm... updating its env file" 52 einfo "Emerging the current generation-1 system-vm..."
53 einfo "Updating its config files."
45 java-config-1 --set-system-vm=${P} 54 java-config-1 --set-system-vm=${P} 2>/dev/null
55 # dirty check to see if current system vm is a jre - replace it with
56 elif [[ "${systemvm1}" = *jre* ]]; then
57 ewarn "Current generation-1 system-vm is a JRE"
58 ewarn "For the new and old Java systems to coexist,"
59 ewarn "the generation-1 system-vm must be a JDK."
60 ewarn "Setting generation-1 system-vm to ${VMHANDLE}"
61 java-config-1 --set-system-vm=${P} 2>/dev/null
46 fi 62 fi
47 # else... some other VM is being updated, so we don't have to worry 63 # else... some other VM is being updated, so we don't have to worry
48 fi 64 fi
49 65
50 if has nsplugin ${IUSE} && use nsplugin; then 66 if has nsplugin ${IUSE} && use nsplugin; then

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.20