From 254b23e46c760b92490f39c277182a41a297b291 Mon Sep 17 00:00:00 2001 From: John Mylchreest Date: Sat, 15 Jan 2005 21:19:02 +0000 Subject: [PATCH] Added support for CONFIG_CHECK=@OPTION:module which removes modules from MODULE_NAMES if the support is already in the kernel --- eclass/linux-info.eclass | 27 ++++++++++++++++++++++++--- eclass/linux-mod.eclass | 3 ++- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass index a15b977357e5..75d92638b817 100644 --- a/eclass/linux-info.eclass +++ b/eclass/linux-info.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/linux-info.eclass,v 1.16 2005/01/06 13:58:15 johnm Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/linux-info.eclass,v 1.17 2005/01/15 21:19:02 johnm Exp $ # # Description: This eclass is used as a central eclass for accessing kernel # related information for sources already installed. @@ -392,7 +392,7 @@ check_modules_supported() { } check_extra_config() { -local config negate error local_error + local config negate error local_error i n temp_config # if we haven't determined the version yet, we need too. get_version; @@ -412,6 +412,27 @@ local config negate error local_error eerror " CONFIG_${config}:\tshould not be set in the kernel configuration, but it is." error=1 fi + elif [ "${negate}" == "@" ]; + then + # we never call this unless we are using MODULE_NAMES + + config="${config:1}" + temp_config="${config//*:}" + config="${config//:*}" + if linux_chkconfig_present ${config} + then + local_error="${config}_ERROR" + local_error="${!local_error}" + [ -n "${local_error}" ] && eerror " ${local_error}" || \ + eerror " CONFIG_${config}:\tshould not be set in the kernel configuration, but it is." + + for i in ${MODULE_NAMES} + do + n="${i//${temp_config}}" + [ -z "${n//(*}" ] && MODULE_IGNORE="${MODULE_IGNORE} ${i}" + done + error=0 + fi else if ! linux_chkconfig_present ${config} then @@ -424,7 +445,7 @@ local config negate error local_error fi done - if [ -n "${error}" ] ; + if [ "${error}" == 1 ] ; then eerror "Please check to make sure these options are set correctly." eerror "Once you have satisfied these options, please try merging" diff --git a/eclass/linux-mod.eclass b/eclass/linux-mod.eclass index 4067df8af3e3..8b9ec24893e2 100644 --- a/eclass/linux-mod.eclass +++ b/eclass/linux-mod.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/linux-mod.eclass,v 1.18 2005/01/15 20:40:14 johnm Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/linux-mod.eclass,v 1.19 2005/01/15 21:19:02 johnm Exp $ # Description: This eclass is used to interface with linux-info in such a way # to provide the functionality required and initial functions @@ -302,6 +302,7 @@ linux-mod_src_compile() { local modulename libdir srcdir objdir i n BUILD_TARGETS=${BUILD_TARGETS:-clean module} + MODULE_NAMES=${MODULE_NAMES//${MODULE_IGNORE}} for i in ${MODULE_NAMES} do -- 2.26.2