# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.233 2010/05/02 11:05:28 ulm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.234 2010/05/20 23:11:48 robbat2 Exp $
# Description: kernel.eclass rewrite for a clean base regarding the 2.6
# series of kernel with back-compatibility for 2.4
KV_PATCH=$(get_version_component_range 3- ${OKV})
fi
KV_PATCH=${KV_PATCH/[-_]*}
+
+ local v n=0 missing
+ for v in CKV OKV KV_{MAJOR,MINOR,PATCH} ; do
+ [[ -z ${!v} ]] && n=1 && missing="${missing}${v} ";
+ done
+ [[ $n -eq 1 ]] && \
+ eerror "Missing variables: ${missing}" && \
+ die "Failed to extract kernel version (try explicit CKV in ebuild)!"
+ unset v n missing
KERNEL_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${OKV}.tar.bz2"
RELEASE=${RELEASE/_beta}
RELEASE=${RELEASE/_rc/-rc}
RELEASE=${RELEASE/_pre/-pre}
- kernel_is ge 2 6 && RELEASE=${RELEASE/-pre/-git}
+ # We cannot trivally call kernel_is here, because it calls us to detect the
+ # version
+ #kernel_is ge 2 6 && RELEASE=${RELEASE/-pre/-git}
+ [ $(($KV_MAJOR * 1000 + $KV_MINOR)) -ge 2006 ] && RELEASE=${RELEASE/-pre/-git}
RELEASETYPE=${RELEASE//[0-9]}
# Now we know that RELEASE is the -rc/-git