/[gentoo-x86]/eclass/kernel-2.eclass
Gentoo

Diff of /eclass/kernel-2.eclass

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

Revision 1.233 Revision 1.234
1# Copyright 1999-2009 Gentoo Foundation 1# Copyright 1999-2009 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/kernel-2.eclass,v 1.233 2010/05/02 11:05:28 ulm Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.234 2010/05/20 23:11:48 robbat2 Exp $
4 4
5# Description: kernel.eclass rewrite for a clean base regarding the 2.6 5# Description: kernel.eclass rewrite for a clean base regarding the 2.6
6# series of kernel with back-compatibility for 2.4 6# series of kernel with back-compatibility for 2.4
7# 7#
8# Original author: John Mylchreest <johnm@gentoo.org> 8# Original author: John Mylchreest <johnm@gentoo.org>
156 KV_EXTRA=${KV_EXTRA/[-_]*} 156 KV_EXTRA=${KV_EXTRA/[-_]*}
157 else 157 else
158 KV_PATCH=$(get_version_component_range 3- ${OKV}) 158 KV_PATCH=$(get_version_component_range 3- ${OKV})
159 fi 159 fi
160 KV_PATCH=${KV_PATCH/[-_]*} 160 KV_PATCH=${KV_PATCH/[-_]*}
161
162 local v n=0 missing
163 for v in CKV OKV KV_{MAJOR,MINOR,PATCH} ; do
164 [[ -z ${!v} ]] && n=1 && missing="${missing}${v} ";
165 done
166 [[ $n -eq 1 ]] && \
167 eerror "Missing variables: ${missing}" && \
168 die "Failed to extract kernel version (try explicit CKV in ebuild)!"
169 unset v n missing
161 170
162 KERNEL_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${OKV}.tar.bz2" 171 KERNEL_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${OKV}.tar.bz2"
163 172
164 RELEASE=${CKV/${OKV}} 173 RELEASE=${CKV/${OKV}}
165 RELEASE=${RELEASE/_beta} 174 RELEASE=${RELEASE/_beta}
166 RELEASE=${RELEASE/_rc/-rc} 175 RELEASE=${RELEASE/_rc/-rc}
167 RELEASE=${RELEASE/_pre/-pre} 176 RELEASE=${RELEASE/_pre/-pre}
177 # We cannot trivally call kernel_is here, because it calls us to detect the
178 # version
168 kernel_is ge 2 6 && RELEASE=${RELEASE/-pre/-git} 179 #kernel_is ge 2 6 && RELEASE=${RELEASE/-pre/-git}
180 [ $(($KV_MAJOR * 1000 + $KV_MINOR)) -ge 2006 ] && RELEASE=${RELEASE/-pre/-git}
169 RELEASETYPE=${RELEASE//[0-9]} 181 RELEASETYPE=${RELEASE//[0-9]}
170 182
171 # Now we know that RELEASE is the -rc/-git 183 # Now we know that RELEASE is the -rc/-git
172 # and RELEASETYPE is the same but with its numerics stripped 184 # and RELEASETYPE is the same but with its numerics stripped
173 # we can work on better sorting EXTRAVERSION. 185 # we can work on better sorting EXTRAVERSION.

Legend:
Removed from v.1.233  
changed lines
  Added in v.1.234

  ViewVC Help
Powered by ViewVC 1.1.20