summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorJohn Mylchreest <johnm@gentoo.org>2004-11-26 01:47:42 +0000
committerJohn Mylchreest <johnm@gentoo.org>2004-11-26 01:47:42 +0000
commitd29b5c2a77bceb80a3a83c54f8ffeb6b0a90cfba (patch)
treef6c9db446bbcee0c454e07924bf3c52e3705568f /eclass
parentFixing bug #71684 with supplied patch (diff)
downloadhistorical-d29b5c2a77bceb80a3a83c54f8ffeb6b0a90cfba.tar.gz
historical-d29b5c2a77bceb80a3a83c54f8ffeb6b0a90cfba.tar.bz2
historical-d29b5c2a77bceb80a3a83c54f8ffeb6b0a90cfba.zip
sorry folks. caused a little breakage somehow! anyways, fixed now. detect_version should go back to being global. sorry to be a pita
Diffstat (limited to 'eclass')
-rw-r--r--eclass/kernel-2.eclass19
1 files changed, 10 insertions, 9 deletions
diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass
index d39b346123e9..888be0e654d3 100644
--- a/eclass/kernel-2.eclass
+++ b/eclass/kernel-2.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/kernel-2.eclass,v 1.50 2004/11/25 23:39:34 johnm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.51 2004/11/26 01:47:42 johnm Exp $
# kernel.eclass rewrite for a clean base regarding the 2.6 series of kernel
# with back-compatibility for 2.4
@@ -63,7 +63,7 @@ SLOT="${KV}"
# Grab kernel version from KV
KV_MAJOR=$(echo ${KV} | cut -d. -f1)
KV_MINOR=$(echo ${KV} | cut -d. -f2)
-KV_PATCH=$(echo ${KV} | cut -d. -f3)
+KV_PATCH=$(echo ${KV} | cut -d. -f3-)
KV_PATCH=${KV_PATCH/[-_]*/}
# set LINUX_HOSTCFLAGS if not already set
@@ -326,7 +326,8 @@ postinst_sources() {
fi
# Show policy version, if this kernel has SELinux...
- local secfile="${ROOT}usr/src/linux-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}/security/selinux/include/security.h"
+ local secfile
+ secfile="${ROOT}usr/src/linux-${KV}/security/selinux/include/security.h"
if use selinux && [ -f "$secfile" ]
then
local polver=$(awk '/POLICYDB_VERSION /{print $3}' $secfile)
@@ -354,7 +355,7 @@ postinst_headers() {
einfo "you re-merge glibc as follows:"
einfo "# emerge glibc"
einfo "Failure to do so will cause glibc to not make use of newer"
- einfo "features present in the updated kernelheaders."
+ einfo "features present in the updated kernel headers."
echo
}
@@ -574,7 +575,9 @@ detect_version() {
# KV: Kernel Version (2.6.0-gentoo/2.6.0-test11-gentoo-r1)
# EXTRAVERSION: The additional version appended to OKV (-gentoo/-gentoo-r1)
- if [ -z "${OKV}" ]
+ [ -n "${DETECTED}" ] && return
+
+ if [ -z "${OKV}" ];
then
OKV=${PV/_beta/-test}
OKV=${OKV/_rc/-rc}
@@ -584,7 +587,7 @@ detect_version() {
KV_MAJOR=$(echo ${OKV} | cut -d. -f1)
KV_MINOR=$(echo ${OKV} | cut -d. -f2)
- KV_PATCH=$(echo ${OKV} | cut -d. -f3)
+ KV_PATCH=$(echo ${OKV} | cut -d. -f3-)
KV_PATCH=${KV_PATCH/[-_]*/}
KERNEL_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${OKV}.tar.bz2"
@@ -599,7 +602,6 @@ detect_version() {
RELEASE=${RELEASE/_pre/-bk}
fi
RELEASETYPE=${RELEASE//[0-9]/}
-
EXTRAVERSION="${RELEASE}"
if [ -n "${K_PREPATCHED}" ]
@@ -611,8 +613,6 @@ detect_version() {
[ "${PR}" != "r0" ] && EXTRAVERSION="${EXTRAVERSION}-${PR}"
fi
- KV=${OKV}${EXTRAVERSION}
-
# -rcXX-bkXX pulls are *IMPOSSIBLE* to support within the
# portage naming convention these cannot be supported, but the code here can
# handle it up until this point and theoretically thereafter.
@@ -648,6 +648,7 @@ detect_version() {
fi
S=${WORKDIR}/linux-${KV}
+ DETECTED="yes"
}
detect_arch() {