1 |
robbat2 10/04/26 06:44:38 |
2 |
|
3 |
Modified: kernel-2.eclass |
4 |
Log: |
5 |
While working on the libre-sources bug, I noticed that some of the kernel sources ebuilds out there have OKV set, but NOT KV_*, leading kernel_is to always return false. Check all of the variables we need for safety instead. |
6 |
|
7 |
Revision Changes Path |
8 |
1.226 eclass/kernel-2.eclass |
9 |
|
10 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/kernel-2.eclass?rev=1.226&view=markup |
11 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/kernel-2.eclass?rev=1.226&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/kernel-2.eclass?r1=1.225&r2=1.226 |
13 |
|
14 |
Index: kernel-2.eclass |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v |
17 |
retrieving revision 1.225 |
18 |
retrieving revision 1.226 |
19 |
diff -p -w -b -B -u -u -r1.225 -r1.226 |
20 |
--- kernel-2.eclass 1 Apr 2010 21:12:20 -0000 1.225 |
21 |
+++ kernel-2.eclass 26 Apr 2010 06:44:38 -0000 1.226 |
22 |
@@ -1,6 +1,6 @@ |
23 |
# Copyright 1999-2009 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.225 2010/04/01 21:12:20 robbat2 Exp $ |
26 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.226 2010/04/26 06:44:38 robbat2 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 |
@@ -247,7 +247,14 @@ detect_version() { |
31 |
} |
32 |
|
33 |
kernel_is() { |
34 |
- [[ -z ${OKV} ]] && detect_version |
35 |
+ # ALL of these should be set before we can safely continue this function. |
36 |
+ # some of the sources have in the past had only one set. |
37 |
+ local v n=0 |
38 |
+ for v in OKV KV_{MAJOR,MINOR,PATCH} ; do [[ -z ${!v} ]] && n=1 ; done |
39 |
+ [[ $n -eq 1 ]] && detect_version |
40 |
+ unset v n |
41 |
+ |
42 |
+ # Now we can continue |
43 |
local operator test value x=0 y=0 z=0 |
44 |
|
45 |
case ${1} in |