1 |
robbat2 10/04/26 07:26:06 |
2 |
|
3 |
Modified: kernel-2.eclass |
4 |
Log: |
5 |
Document the new deblob control variables, after renaming them to match the existing pattern. |
6 |
|
7 |
Revision Changes Path |
8 |
1.230 eclass/kernel-2.eclass |
9 |
|
10 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/kernel-2.eclass?rev=1.230&view=markup |
11 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/kernel-2.eclass?rev=1.230&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/kernel-2.eclass?r1=1.229&r2=1.230 |
13 |
|
14 |
Index: kernel-2.eclass |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v |
17 |
retrieving revision 1.229 |
18 |
retrieving revision 1.230 |
19 |
diff -p -w -b -B -u -u -r1.229 -r1.230 |
20 |
--- kernel-2.eclass 26 Apr 2010 07:15:03 -0000 1.229 |
21 |
+++ kernel-2.eclass 26 Apr 2010 07:26:06 -0000 1.230 |
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.229 2010/04/26 07:15:03 robbat2 Exp $ |
26 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.230 2010/04/26 07:26:06 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 |
@@ -45,6 +45,13 @@ |
31 |
# A value of "5" would apply genpatches-2.6.12-5 to |
32 |
# my-sources-2.6.12.ebuild |
33 |
# K_SECURITY_UNSUPPORTED- If set, this kernel is unsupported by Gentoo Security |
34 |
+# K_DEBLOB_AVAILABLE - A value of "0" will disable all of the optional deblob |
35 |
+# code. If empty, will be set to "1" if deblobbing is |
36 |
+# possible. Test ONLY for "1". |
37 |
+# K_PREDEBLOBBED - This kernel was already deblobbed elsewhere. |
38 |
+# If false, either optional deblobbing will be available |
39 |
+# or the license will note the inclusion of freedist |
40 |
+# code. |
41 |
|
42 |
# H_SUPPORTEDARCH - this should be a space separated list of ARCH's which |
43 |
# can be supported by the headers ebuild |
44 |
@@ -301,15 +308,15 @@ if [[ ${ETYPE} == sources ]]; then |
45 |
IUSE="symlink build" |
46 |
|
47 |
# Bug #266157, deblob for libre support |
48 |
- if [[ -z ${KERNEL_DEBLOBBED} ]] ; then |
49 |
- if kernel_is ge 2 6 27 ; then |
50 |
+ if [[ -z ${K_PREDEBLOBBED} ]] ; then |
51 |
+ if kernel_is ge 2 6 27 && [[ -z ${K_DEBLOB_AVAILABLE} ]] ; then |
52 |
IUSE="${IUSE} deblob" |
53 |
# Reflect that kernels contain firmware blobs unless otherwise |
54 |
# stripped |
55 |
LICENSE="${LICENSE} !deblob? ( freedist )" |
56 |
|
57 |
# This to to avoid us triggering some QA warnings |
58 |
- DEBLOB_AVAILABLE=1 |
59 |
+ K_DEBLOB_AVAILABLE=1 |
60 |
|
61 |
DEBLOB_PV="${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}" |
62 |
DEBLOB_A="deblob-${DEBLOB_PV}" |
63 |
@@ -654,7 +661,7 @@ postinst_sources() { |
64 |
use symlink && K_SYMLINK=1 |
65 |
|
66 |
# if we're using a deblobbed kernel, it's not supported |
67 |
- [[ $DEBLOB_AVAILABLE == "1" ]] && \ |
68 |
+ [[ $K_DEBLOB_AVAILABLE == 1 ]] && \ |
69 |
use deblob && \ |
70 |
K_SECURITY_UNSUPPORTED=1 |
71 |
|
72 |
@@ -1099,7 +1106,7 @@ kernel-2_src_unpack() { |
73 |
kernel_is 2 6 && unpack_2_6 |
74 |
fi |
75 |
|
76 |
- if [[ $DEBLOB_AVAILABLE == "1" ]] && use deblob ; then |
77 |
+ if [[ $K_DEBLOB_AVAILABLE == 1 ]] && use deblob ; then |
78 |
cp "${DISTDIR}/${DEBLOB_A}" "${T}" |
79 |
chmod +x "${T}/${DEBLOB_A}" |
80 |
fi |
81 |
@@ -1109,7 +1116,7 @@ kernel-2_src_compile() { |
82 |
cd "${S}" |
83 |
[[ ${ETYPE} == headers ]] && compile_headers |
84 |
|
85 |
- if [[ $DEBLOB_AVAILABLE == "1" ]] && use deblob ; then |
86 |
+ if [[ $K_DEBLOB_AVAILABLE == 1 ]] && use deblob ; then |
87 |
echo ">>> Running deblob script ..." |
88 |
sh "${T}/${DEBLOB_A}" --force || \ |
89 |
die "Deblob script failed to run!!!" |