/[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.65 Revision 1.66
1# Copyright 1999-2006 Gentoo Foundation 1# Copyright 1999-2006 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.65 2009/09/06 23:16:37 robbat2 Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/linux-info.eclass,v 1.66 2009/09/06 23:24:49 robbat2 Exp $
4# 4#
5# Original author: John Mylchreest <johnm@gentoo.org> 5# Original author: John Mylchreest <johnm@gentoo.org>
6# Maintainer: kernel-misc@gentoo.org 6# Maintainer: kernel-misc@gentoo.org
7# 7#
8# Please direct your bugs to the current eclass maintainer :) 8# Please direct your bugs to the current eclass maintainer :)
555 && KV_EXTRA="-${KV_FULL#*-}" 555 && KV_EXTRA="-${KV_FULL#*-}"
556 fi 556 fi
557 return 0 557 return 0
558} 558}
559 559
560# This next function is named with the eclass prefix to avoid conflicts with
561# some old versionator-like eclass functions.
562
563# @FUNCTION: linux-info_get_any_version
564# @DESCRIPTION:
565# This attempts to find the version of the sources, and otherwise falls back to
566# the version of the running kernel.
567linux-info_get_any_version() {
568 get_version
569 if [[ $rc -ne 0 ]]; then
570 ewarn "Unable to calculate Linux Kernel version for build, attempting to use running version"
571 get_running_version
572 fi
573}
574
560 575
561# ebuild check functions 576# ebuild check functions
562# --------------------------------------- 577# ---------------------------------------
563 578
564# @FUNCTION: check_kernel_built 579# @FUNCTION: check_kernel_built
805# @FUNCTION: linux-info_pkg_setup 820# @FUNCTION: linux-info_pkg_setup
806# @DESCRIPTION: 821# @DESCRIPTION:
807# Force a get_version() call when inherited from linux-mod.eclass and then check if the kernel is configured 822# Force a get_version() call when inherited from linux-mod.eclass and then check if the kernel is configured
808# to support the options specified in CONFIG_CHECK (if not null) 823# to support the options specified in CONFIG_CHECK (if not null)
809linux-info_pkg_setup() { 824linux-info_pkg_setup() {
810 get_version 825 linux-info_get_any_version
811 if [[ $rc -ne 0 ]]; then
812 ewarn "Unable to calculate Linux Kernel version for build, attempting to use running version"
813 get_running_version
814 fi
815 826
816 if kernel_is 2 4; then 827 if kernel_is 2 4; then
817 if [ "$( gcc-major-version )" -eq "4" ] ; then 828 if [ "$( gcc-major-version )" -eq "4" ] ; then
818 echo 829 echo
819 ewarn "Be warned !! >=sys-devel/gcc-4.0.0 isn't supported with" 830 ewarn "Be warned !! >=sys-devel/gcc-4.0.0 isn't supported with"

Legend:
Removed from v.1.65  
changed lines
  Added in v.1.66

  ViewVC Help
Powered by ViewVC 1.1.20