/[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.265 Revision 1.266
1# Copyright 1999-2011 Gentoo Foundation 1# Copyright 1999-2011 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.265 2011/12/02 00:15:46 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.266 2011/12/02 01:54:09 vapier 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>
116handle_genpatches() { 116handle_genpatches() {
117 local tarball 117 local tarball
118 [[ -z ${K_WANT_GENPATCHES} || -z ${K_GENPATCHES_VER} ]] && return 1 118 [[ -z ${K_WANT_GENPATCHES} || -z ${K_GENPATCHES_VER} ]] && return 1
119 119
120 debug-print "Inside handle_genpatches" 120 debug-print "Inside handle_genpatches"
121 local oldifs=${IFS}
122 export IFS="."
123 local OKV_ARRAY=( $OKV ) 121 local OKV_ARRAY
124 export IFS=${oldifs} 122 IFS="." read -r -a OKV_ARRAY <<<"${OKV}"
125 123
126 # for > 3.0 kernels, handle genpatches tarball name 124 # for > 3.0 kernels, handle genpatches tarball name
127 # genpatches for 3.0 and 3.0.1 might be named 125 # genpatches for 3.0 and 3.0.1 might be named
128 # genpatches-3.0-1.base.tar.bz2 and genpatches-3.0-2.base.tar.bz2 126 # genpatches-3.0-1.base.tar.bz2 and genpatches-3.0-2.base.tar.bz2
129 # respectively. Handle this. 127 # respectively. Handle this.
170 OKV=${OKV/-r*} 168 OKV=${OKV/-r*}
171 OKV=${OKV/_p*} 169 OKV=${OKV/_p*}
172 170
173 KV_MAJOR=$(get_version_component_range 1 ${OKV}) 171 KV_MAJOR=$(get_version_component_range 1 ${OKV})
174 # handle if OKV is X.Y or X.Y.Z (e.g. 3.0 or 3.0.1) 172 # handle if OKV is X.Y or X.Y.Z (e.g. 3.0 or 3.0.1)
175 local oldifs=${IFS}
176 export IFS="."
177 local OKV_ARRAY=( $OKV ) 173 local OKV_ARRAY
178 export IFS=${oldifs} 174 IFS="." read -r -a OKV_ARRAY <<<"${OKV}"
179 175
180 # if KV_MAJOR >= 3, then we have no more KV_MINOR 176 # if KV_MAJOR >= 3, then we have no more KV_MINOR
181 #if [[ ${KV_MAJOR} -lt 3 ]]; then 177 #if [[ ${KV_MAJOR} -lt 3 ]]; then
182 if [[ ${#OKV_ARRAY[@]} -ge 3 ]]; then 178 if [[ ${#OKV_ARRAY[@]} -ge 3 ]]; then
183 KV_MINOR=$(get_version_component_range 2 ${OKV}) 179 KV_MINOR=$(get_version_component_range 2 ${OKV})
570} 566}
571 567
572universal_unpack() { 568universal_unpack() {
573 debug-print "Inside universal_unpack" 569 debug-print "Inside universal_unpack"
574 570
575 local oldifs=${IFS}
576 export IFS="."
577 local OKV_ARRAY=( $OKV ) 571 local OKV_ARRAY
578 export IFS=${oldifs} 572 IFS="." read -r -a OKV_ARRAY <<<"${OKV}"
579 573
580 cd "${WORKDIR}" 574 cd "${WORKDIR}"
581 if [[ ${#OKV_ARRAY[@]} -ge 3 ]] && [[ ${KV_MAJOR} -ge 3 ]]; then 575 if [[ ${#OKV_ARRAY[@]} -ge 3 ]] && [[ ${KV_MAJOR} -ge 3 ]]; then
582 unpack linux-${KV_MAJOR}.${KV_MINOR}.tar.bz2 576 unpack linux-${KV_MAJOR}.${KV_MINOR}.tar.bz2
583 else 577 else

Legend:
Removed from v.1.265  
changed lines
  Added in v.1.266

  ViewVC Help
Powered by ViewVC 1.1.20