/[gentoo-x86]/eclass/linux-info.eclass
Gentoo

Diff of /eclass/linux-info.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.16 Revision 1.17
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2004 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/linux-info.eclass,v 1.16 2005/01/06 13:58:15 johnm Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/linux-info.eclass,v 1.17 2005/01/15 21:19:02 johnm Exp $
4# 4#
5# Description: This eclass is used as a central eclass for accessing kernel 5# Description: This eclass is used as a central eclass for accessing kernel
6# related information for sources already installed. 6# related information for sources already installed.
7# It is vital for linux-mod to function correctly, and is split 7# It is vital for linux-mod to function correctly, and is split
8# out so that any ebuild behaviour "templates" are abstracted out 8# out so that any ebuild behaviour "templates" are abstracted out
390 die "No support for external modules in ${KV_FULL} config" 390 die "No support for external modules in ${KV_FULL} config"
391 fi 391 fi
392} 392}
393 393
394check_extra_config() { 394check_extra_config() {
395local config negate error local_error 395 local config negate error local_error i n temp_config
396 396
397 # if we haven't determined the version yet, we need too. 397 # if we haven't determined the version yet, we need too.
398 get_version; 398 get_version;
399 399
400 einfo "Checking for suitable kernel configuration options" 400 einfo "Checking for suitable kernel configuration options"
410 local_error="${!local_error}" 410 local_error="${!local_error}"
411 [ -n "${local_error}" ] && eerror " ${local_error}" || \ 411 [ -n "${local_error}" ] && eerror " ${local_error}" || \
412 eerror " CONFIG_${config}:\tshould not be set in the kernel configuration, but it is." 412 eerror " CONFIG_${config}:\tshould not be set in the kernel configuration, but it is."
413 error=1 413 error=1
414 fi 414 fi
415 elif [ "${negate}" == "@" ];
416 then
417 # we never call this unless we are using MODULE_NAMES
418
419 config="${config:1}"
420 temp_config="${config//*:}"
421 config="${config//:*}"
422 if linux_chkconfig_present ${config}
423 then
424 local_error="${config}_ERROR"
425 local_error="${!local_error}"
426 [ -n "${local_error}" ] && eerror " ${local_error}" || \
427 eerror " CONFIG_${config}:\tshould not be set in the kernel configuration, but it is."
428
429 for i in ${MODULE_NAMES}
430 do
431 n="${i//${temp_config}}"
432 [ -z "${n//(*}" ] && MODULE_IGNORE="${MODULE_IGNORE} ${i}"
433 done
434 error=0
435 fi
415 else 436 else
416 if ! linux_chkconfig_present ${config} 437 if ! linux_chkconfig_present ${config}
417 then 438 then
418 local_error="${config}_ERROR" 439 local_error="${config}_ERROR"
419 local_error="${!local_error}" 440 local_error="${!local_error}"
422 error=1 443 error=1
423 fi 444 fi
424 fi 445 fi
425 done 446 done
426 447
427 if [ -n "${error}" ] ; 448 if [ "${error}" == 1 ] ;
428 then 449 then
429 eerror "Please check to make sure these options are set correctly." 450 eerror "Please check to make sure these options are set correctly."
430 eerror "Once you have satisfied these options, please try merging" 451 eerror "Once you have satisfied these options, please try merging"
431 eerror "this package again." 452 eerror "this package again."
432 die "Incorrect kernel configuration options" 453 die "Incorrect kernel configuration options"

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

  ViewVC Help
Powered by ViewVC 1.1.20