| 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.35 2011/10/29 14:36:34 caster Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/java-vm-2.eclass,v 1.36 2011/10/30 11:06:38 caster Exp $ |
| 4 | |
4 | |
| 5 | # ----------------------------------------------------------------------------- |
5 | # ----------------------------------------------------------------------------- |
| 6 | # @eclass-begin |
6 | # @eclass-begin |
| 7 | # @eclass-shortdesc Java Virtual Machine eclass |
7 | # @eclass-shortdesc Java Virtual Machine eclass |
| 8 | # @eclass-maintainer java@gentoo.org |
8 | # @eclass-maintainer java@gentoo.org |
| … | |
… | |
| 94 | eselect java-nsplugin set ${extra_args} ${VMHANDLE} |
94 | eselect java-nsplugin set ${extra_args} ${VMHANDLE} |
| 95 | } |
95 | } |
| 96 | |
96 | |
| 97 | java-vm-2_pkg_prerm() { |
97 | java-vm-2_pkg_prerm() { |
| 98 | # Although REPLACED_BY_VERSION is EAPI=4, we shouldn't need to check EAPI for this use case |
98 | # Although REPLACED_BY_VERSION is EAPI=4, we shouldn't need to check EAPI for this use case |
| 99 | if [[ "$(java-config -f 2>/dev/null)" == "${VMHANDLE}" && -z "${REPLACED_BY_VERSION}" ]]; then |
99 | if [[ "$(GENTOO_VM="" java-config -f 2>/dev/null)" == "${VMHANDLE}" && -z "${REPLACED_BY_VERSION}" ]]; then |
| 100 | ewarn "It appears you are removing your system-vm!" |
100 | ewarn "It appears you are removing your system-vm!" |
| 101 | ewarn "Please run java-config -L to list available VMs," |
101 | ewarn "Please run java-config -L to list available VMs," |
| 102 | ewarn "then use java-config -S to set a new system-vm!" |
102 | ewarn "then use java-config -S to set a new system-vm!" |
| 103 | fi |
103 | fi |
| 104 | } |
104 | } |