From: Joshua Nichols Date: Sat, 5 Aug 2006 21:14:59 +0000 (+0000) Subject: Added helper method to ensure that when FEATURE=test, then USE=test as well, or dies... X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7e75d3a4e5d43f972f682a166044878785af2980;p=gentoo.git Added helper method to ensure that when FEATURE=test, then USE=test as well, or dies otherwise. Should probably be used in pkg_setup when appropriate. --- diff --git a/eclass/java-utils-2.eclass b/eclass/java-utils-2.eclass index ab0f19ed1150..eac0b12d0bb1 100644 --- a/eclass/java-utils-2.eclass +++ b/eclass/java-utils-2.eclass @@ -1195,6 +1195,14 @@ java-pkg_ensure-gcj() { fi } +java-pkg_ensure-test() { + if hasq test ${FEATURES} && ! hasq -test ${FEATURES} && ! use test; then + eerror "You specified FEATURES=test, but USE=test is needed" + eerror "to pull in the additional dependencies for testing" + die "Need USE=test enabled" + fi +} + # ------------------------------------------------------------------------------ # @section-end helper # ------------------------------------------------------------------------------