summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Mylchreest <johnm@gentoo.org>2004-12-28 20:05:45 +0000
committerJohn Mylchreest <johnm@gentoo.org>2004-12-28 20:05:45 +0000
commit8669228e96bf3359e995910a4b1e4a2586c6acf9 (patch)
tree2218eeb7b538e3e0e471290f7dea2390e5749b5e
parentMoved from dev-libs/cln to sci-libs/cln. (diff)
downloadhistorical-8669228e96bf3359e995910a4b1e4a2586c6acf9.tar.gz
historical-8669228e96bf3359e995910a4b1e4a2586c6acf9.tar.bz2
historical-8669228e96bf3359e995910a4b1e4a2586c6acf9.zip
Adding support for kernel_is operators, and removing on behalf of line from modules.d regeneration.
-rw-r--r--eclass/linux-info.eclass39
-rw-r--r--eclass/linux-mod.eclass5
2 files changed, 30 insertions, 14 deletions
diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
index cff75eff15a4..38a47d934389 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.11 2004/12/17 15:12:07 johnm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/linux-info.eclass,v 1.12 2004/12/28 20:05:45 johnm Exp $
#
# Description: This eclass is used as a central eclass for accessing kernel
# related information for sources already installed.
@@ -182,24 +182,39 @@ kernel_is() {
# if we haven't determined the version yet, we need too.
get_version;
- local RESULT
- RESULT=1
+ local RESULT operator value test
+ RESULT=0
+ operator="-eq"
+ if [ "${1}" == "lt" ]
+ then
+ operator="-lt"
+ shift
+ elif [ "${1}" == "gt" ]
+ then
+ operator="-gt"
+ shift
+ elif [ "${1}" == "le" ]
+ then
+ operator="-le"
+ shift
+ elif [ "${1}" == "ge" ]
+ then
+ operator="-ge"
+ shift
+ fi
+
if [ -n "${1}" ]
then
- [ "${1}" = "${KV_MAJOR}" ] && RESULT=0
+ [ ${KV_MAJOR} ${operator} ${1} ] || RESULT=1
fi
-
if [ -n "${2}" ]
then
- RESULT=1
- [ "${2}" = "${KV_MINOR}" ] && RESULT=0
+ [ ${KV_MINOR} ${operator} ${2} -a ${RESULT} -eq 0 ] || RESULT=1
fi
-
if [ -n "${3}" ]
then
- RESULT=1
- [ "${3}" = "${KV_PATCH}" ] && RESULT=0
+ [ ${KV_PATCH} ${operator} ${3} -a ${RESULT} -eq 0 ] || RESULT=1
fi
return ${RESULT}
}
@@ -301,7 +316,9 @@ get_version() {
if [ ! -s "${KV_OUT_DIR}/.config" ]
then
qeerror "Could not find a usable .config in the kernel source directory."
- qeerror "Please ensure that ${KERNEL_DIR} points to a configured set of Linux sources"
+ qeerror "Please ensure that ${KERNEL_DIR} points to a configured set of Linux sources."
+ qeerror "If you are using KBUILD_OUTPUT, please set the environment var so that"
+ qeerror "it points to the necessary object directory so that it might find .config."
die ".config not found in ${KV_OUT_DIR}"
fi
}
diff --git a/eclass/linux-mod.eclass b/eclass/linux-mod.eclass
index f410dfad2e3c..b08acc30883b 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.12 2004/12/18 16:22:13 johnm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/linux-mod.eclass,v 1.13 2004/12/28 20:05:45 johnm Exp $
# Description: This eclass is used to interface with linux-info in such a way
# to provide the functionality required and initial functions
@@ -156,15 +156,14 @@ generate_modulesd() {
ebegin "Preparing file for modules.d"
echo "# modules.d config file for ${selectedmodule}" >> ${module_config}
echo "# this file was automatically generated from linux-mod.eclass" >> ${module_config}
- echo "# on behalf of ${EBUILD/*\//}" >> ${module_config}
for temp in ${module_docs}
do
echo "# Please read ${temp/*\//} for more info" >> ${module_config}
done
- # like inserting any aliases
if [ ${module_aliases} > 0 ];
then
+ echo >> ${module_config}
echo "# Internal Aliases - Do not edit" >> ${module_config}
echo "# ------------------------------" >> ${module_config}