Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: kernel-2.eclass
Date: Fri, 02 Dec 2011 01:54:28
Message-Id: 20111202015409.1F1882004B@flycatcher.gentoo.org
1 vapier 11/12/02 01:54:09
2
3 Modified: kernel-2.eclass
4 Log:
5 use `read` to simplify the creation of an array from a string
6
7 Revision Changes Path
8 1.266 eclass/kernel-2.eclass
9
10 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/kernel-2.eclass?rev=1.266&view=markup
11 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/kernel-2.eclass?rev=1.266&content-type=text/plain
12 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/kernel-2.eclass?r1=1.265&r2=1.266
13
14 Index: kernel-2.eclass
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v
17 retrieving revision 1.265
18 retrieving revision 1.266
19 diff -u -r1.265 -r1.266
20 --- kernel-2.eclass 2 Dec 2011 00:15:46 -0000 1.265
21 +++ kernel-2.eclass 2 Dec 2011 01:54:09 -0000 1.266
22 @@ -1,6 +1,6 @@
23 # Copyright 1999-2011 Gentoo Foundation
24 # Distributed under the terms of the GNU General Public License v2
25 -# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.265 2011/12/02 00:15:46 vapier Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.266 2011/12/02 01:54:09 vapier Exp $
27
28 # Description: kernel.eclass rewrite for a clean base regarding the 2.6
29 # series of kernel with back-compatibility for 2.4
30 @@ -118,10 +118,8 @@
31 [[ -z ${K_WANT_GENPATCHES} || -z ${K_GENPATCHES_VER} ]] && return 1
32
33 debug-print "Inside handle_genpatches"
34 - local oldifs=${IFS}
35 - export IFS="."
36 - local OKV_ARRAY=( $OKV )
37 - export IFS=${oldifs}
38 + local OKV_ARRAY
39 + IFS="." read -r -a OKV_ARRAY <<<"${OKV}"
40
41 # for > 3.0 kernels, handle genpatches tarball name
42 # genpatches for 3.0 and 3.0.1 might be named
43 @@ -172,10 +170,8 @@
44
45 KV_MAJOR=$(get_version_component_range 1 ${OKV})
46 # handle if OKV is X.Y or X.Y.Z (e.g. 3.0 or 3.0.1)
47 - local oldifs=${IFS}
48 - export IFS="."
49 - local OKV_ARRAY=( $OKV )
50 - export IFS=${oldifs}
51 + local OKV_ARRAY
52 + IFS="." read -r -a OKV_ARRAY <<<"${OKV}"
53
54 # if KV_MAJOR >= 3, then we have no more KV_MINOR
55 #if [[ ${KV_MAJOR} -lt 3 ]]; then
56 @@ -572,10 +568,8 @@
57 universal_unpack() {
58 debug-print "Inside universal_unpack"
59
60 - local oldifs=${IFS}
61 - export IFS="."
62 - local OKV_ARRAY=( $OKV )
63 - export IFS=${oldifs}
64 + local OKV_ARRAY
65 + IFS="." read -r -a OKV_ARRAY <<<"${OKV}"
66
67 cd "${WORKDIR}"
68 if [[ ${#OKV_ARRAY[@]} -ge 3 ]] && [[ ${KV_MAJOR} -ge 3 ]]; then