/[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.117 Revision 1.118
1# Copyright 1999-2005 Gentoo Foundation 1# Copyright 1999-2005 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.117 2005/04/07 18:06:52 johnm Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.118 2005/04/10 21:17:16 johnm 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# Maintainer: John Mylchreest <johnm@gentoo.org> 8# Maintainer: John Mylchreest <johnm@gentoo.org>
113 113
114 RELEASE=${CKV/${OKV}} 114 RELEASE=${CKV/${OKV}}
115 RELEASE=${RELEASE/_beta} 115 RELEASE=${RELEASE/_beta}
116 RELEASE=${RELEASE/_rc/-rc} 116 RELEASE=${RELEASE/_rc/-rc}
117 RELEASE=${RELEASE/_pre/-pre} 117 RELEASE=${RELEASE/_pre/-pre}
118 kernel_is_2_6 && RELEASE=${RELEASE/-pre/-bk} 118 kernel_is ge 2 6 && RELEASE=${RELEASE/-pre/-bk}
119 RELEASETYPE=${RELEASE//[0-9]} 119 RELEASETYPE=${RELEASE//[0-9]}
120 120
121 # Now we know that RELEASE is the -rc/-bk 121 # Now we know that RELEASE is the -rc/-bk
122 # and RELEASETYPE is the same but with its numerics stripped 122 # and RELEASETYPE is the same but with its numerics stripped
123 # we can work on better sorting EXTRAVERSION. 123 # we can work on better sorting EXTRAVERSION.
139 [[ -z ${K_NOUSENAME} ]] && EXTRAVERSION="${EXTRAVERSION}-${PN/-*}" 139 [[ -z ${K_NOUSENAME} ]] && EXTRAVERSION="${EXTRAVERSION}-${PN/-*}"
140 [[ -n ${K_USEPV} ]] && EXTRAVERSION="${EXTRAVERSION}-${PV//_/-}" 140 [[ -n ${K_USEPV} ]] && EXTRAVERSION="${EXTRAVERSION}-${PV//_/-}"
141 [[ -n ${PR//r0} ]] && EXTRAVERSION="${EXTRAVERSION}-${PR}" 141 [[ -n ${PR//r0} ]] && EXTRAVERSION="${EXTRAVERSION}-${PR}"
142 fi 142 fi
143 143
144 # We need to set this using OKV, but we need to set it before we do any
145 # messing around with OKV based on RELEASETYPE
146 KV_FULL=${OKV}${EXTRAVERSION}
147
148 # we will set this for backwards compatibility.
149 S=${WORKDIR}/linux-${KV_FULL}
150 KV=${KV_FULL}
151
144 # -rc-bk pulls can be achieved by specifying CKV 152 # -rc-bk pulls can be achieved by specifying CKV
145 # for example: 153 # for example:
146 # CKV="2.6.11_rc3_pre2" 154 # CKV="2.6.11_rc3_pre2"
147 # will pull: 155 # will pull:
148 # linux-2.6.10.tar.bz2 & patch-2.6.11-rc3.bz2 & patch-2.6.11-rc3-bk2.bz2 156 # linux-2.6.10.tar.bz2 & patch-2.6.11-rc3.bz2 & patch-2.6.11-rc3-bk2.bz2
172 OKV="${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}" 180 OKV="${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
173 KERNEL_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/patch-${CKV}.bz2 181 KERNEL_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/patch-${CKV}.bz2
174 mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}.tar.bz2" 182 mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}.tar.bz2"
175 UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${CKV}.bz2" 183 UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${CKV}.bz2"
176 fi 184 fi
177
178 KV_FULL=${OKV}${EXTRAVERSION}
179
180 # we will set this for backwards compatibility.
181 S=${WORKDIR}/linux-${KV_FULL}
182 KV=${KV_FULL}
183} 185}
184 186
185kernel_is() { 187kernel_is() {
186 [[ -z ${OKV} ]] && detect_version 188 [[ -z ${OKV} ]] && detect_version
187 local operator test value x=0 y=0 z=0 189 local operator test value x=0 y=0 z=0
725 727
726getfilevar() { 728getfilevar() {
727 local workingdir basefname basedname xarch=$(tc-arch-kernel) 729 local workingdir basefname basedname xarch=$(tc-arch-kernel)
728 730
729 if [[ -z ${1} ]] && [[ ! -f ${2} ]]; then 731 if [[ -z ${1} ]] && [[ ! -f ${2} ]]; then
730 ebeep
731 echo -e "\n" 732 echo -e "\n"
732 eerror "getfilevar requires 2 variables, with the second a valid file." 733 eerror "getfilevar requires 2 variables, with the second a valid file."
733 eerror " getfilevar <VARIABLE> <CONFIGFILE>" 734 eerror " getfilevar <VARIABLE> <CONFIGFILE>"
734 else 735 else
735 workingdir=${PWD} 736 workingdir=${PWD}

Legend:
Removed from v.1.117  
changed lines
  Added in v.1.118

  ViewVC Help
Powered by ViewVC 1.1.20