Gentoo Archives: gentoo-commits

From: James Le Cuirot <chewi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Wed, 29 Jun 2016 21:04:48
Message-Id: 1467234263.c7e51c7f60e280aa708df08c86d849ba23507120.chewi@gentoo
1 commit: c7e51c7f60e280aa708df08c86d849ba23507120
2 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jun 28 20:58:58 2016 +0000
4 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
5 CommitDate: Wed Jun 29 21:04:23 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7e51c7f
7
8 java-vm-2.eclass: Drop support for EAPI <5
9
10 eclass/java-vm-2.eclass | 22 ++++++----------------
11 1 file changed, 6 insertions(+), 16 deletions(-)
12
13 diff --git a/eclass/java-vm-2.eclass b/eclass/java-vm-2.eclass
14 index efdf52d..c544191 100644
15 --- a/eclass/java-vm-2.eclass
16 +++ b/eclass/java-vm-2.eclass
17 @@ -10,7 +10,12 @@
18 # This eclass provides functionality which assists with installing
19 # virtual machines, and ensures that they are recognized by java-config.
20
21 -inherit eutils fdo-mime multilib pax-utils prefix
22 +case ${EAPI:-0} in
23 + 5|6) ;;
24 + *) die "EAPI=${EAPI} is not supported" ;;
25 +esac
26 +
27 +inherit fdo-mime multilib pax-utils prefix
28
29 EXPORT_FUNCTIONS pkg_setup pkg_postinst pkg_prerm pkg_postrm
30
31 @@ -18,7 +23,6 @@ RDEPEND="
32 >=dev-java/java-config-2.2.0-r3
33 >=app-eselect/eselect-java-0.2.0"
34 DEPEND="${RDEPEND}"
35 -has "${EAPI}" 0 1 && DEPEND="${DEPEND} >=sys-apps/portage-2.1"
36
37 export WANT_JAVA_CONFIG=2
38
39 @@ -70,7 +74,6 @@ java-vm-2_pkg_setup() {
40 # invalid. Also update mime database.
41
42 java-vm-2_pkg_postinst() {
43 - has ${EAPI:-0} 0 1 2 && ! use prefix && EROOT=${ROOT}
44 # Note that we cannot rely on java-config here, as it will silently recognize
45 # e.g. icedtea6-bin as valid system VM if icedtea6 is set but invalid (e.g. due
46 # to the migration to icedtea-6)
47 @@ -95,7 +98,6 @@ java-vm-2_pkg_postinst() {
48 # Warn user if removing system-vm.
49
50 java-vm-2_pkg_prerm() {
51 - # Although REPLACED_BY_VERSION is EAPI=4, we shouldn't need to check EAPI for this use case
52 if [[ "$(GENTOO_VM="" java-config -f 2>/dev/null)" == "${VMHANDLE}" && -z "${REPLACED_BY_VERSION}" ]]; then
53 ewarn "It appears you are removing your system-vm!"
54 ewarn "Please run java-config -L to list available VMs,"
55 @@ -149,11 +151,6 @@ get_system_arch() {
56 set_java_env() {
57 debug-print-function ${FUNCNAME} $*
58
59 - if has ${EAPI:-0} 0 1 2 && ! use prefix ; then
60 - ED="${D}"
61 - EPREFIX=""
62 - fi
63 -
64 local platform="$(get_system_arch)"
65 local env_file="${ED}${JAVA_VM_CONFIG_DIR}/${VMHANDLE}"
66 local old_env_file="${ED}/etc/env.d/java/20${P}"
67 @@ -255,11 +252,6 @@ java-vm_set-pax-markings() {
68 # @CODE
69
70 java-vm_revdep-mask() {
71 - if has ${EAPI:-0} 0 1 2 && ! use prefix; then
72 - ED="${D}"
73 - EPREFIX=
74 - fi
75 -
76 local VMROOT="${1-"${EPREFIX}"/opt/${P}}"
77
78 dodir /etc/revdep-rebuild/
79 @@ -281,8 +273,6 @@ java-vm_sandbox-predict() {
80 debug-print-function ${FUNCNAME} "$*"
81 [[ -z "${1}" ]] && die "${FUNCNAME} takes at least one argument"
82
83 - has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
84 -
85 local path path_arr=("$@")
86 # subshell this to prevent IFS bleeding out dependant on bash version.
87 # could use local, which *should* work, but that requires a lot of testing.