Added support for CONFIG_CHECK=@OPTION:module which removes modules from MODULE_NAMES...
authorJohn Mylchreest <johnm@gentoo.org>
Sat, 15 Jan 2005 21:19:02 +0000 (21:19 +0000)
committerJohn Mylchreest <johnm@gentoo.org>
Sat, 15 Jan 2005 21:19:02 +0000 (21:19 +0000)
eclass/linux-info.eclass
eclass/linux-mod.eclass

index a15b977357e5dfbb30ca4bae7524cb862c457b75..75d92638b817e3a0c59b4f9b36f05ef412ad9780 100644 (file)
@@ -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"
index 4067df8af3e33f273ef7b10ec29bf49340836c69..8b9ec24893e28dc122baa485039e8c57abf3a2b5 100644 (file)
@@ -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