commit:     a4af96cc8318a53adc3bcd2dc1e3e0618032545f
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 18 21:59:56 2018 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Thu Jan 18 22:00:28 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a4af96cc

eclass/linux-mod.eclass: only need EAPI>0 if using IUSE default.

Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>

 eclass/linux-mod.eclass | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/eclass/linux-mod.eclass b/eclass/linux-mod.eclass
index e310835bf77..bf580cf4cfa 100644
--- a/eclass/linux-mod.eclass
+++ b/eclass/linux-mod.eclass
@@ -135,15 +135,15 @@
 inherit eutils linux-info multilib
 EXPORT_FUNCTIONS pkg_setup pkg_preinst pkg_postinst src_install src_compile 
pkg_postrm
 
-case ${EAPI:-0} in
-       0) die "EAPI=${EAPI} is not supported due to lack of IUSE defaults" ;;
-esac
-
 case ${MODULES_OPTIONAL_USE_IUSE_DEFAULT:-n} in
   [nNfF]*|[oO][fF]*|0|-) _modules_optional_use_iuse_default='' ;;
   *) _modules_optional_use_iuse_default='+' ;;
 esac
 
+[[ -n "${_modules_optional_use_iuse_default}" ]] && case ${EAPI:-0} in
+       0) die "EAPI=${EAPI} is not supported with 
MODULES_OPTIONAL_USE_IUSE_DEFAULT due to lack of IUSE defaults" ;;
+esac
+
 IUSE="kernel_linux 
${MODULES_OPTIONAL_USE:+${_modules_optional_use_iuse_default}}${MODULES_OPTIONAL_USE}"
 SLOT="0"
 RDEPEND="${MODULES_OPTIONAL_USE}${MODULES_OPTIONAL_USE:+? (} kernel_linux? ( 
virtual/modutils ) ${MODULES_OPTIONAL_USE:+)}"

Reply via email to