Gentoo Archives: gentoo-dev

From: Joshua Kinard <kumba@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH] Add deblob support only for python3
Date: Mon, 26 Jul 2021 15:01:42
Message-Id: 9e4a467f-71cb-7429-43e3-a4492ecbcdb7@gentoo.org
In Reply to: Re: [gentoo-dev] [PATCH] Add deblob support only for python3 by Sam James
1 On 7/25/2021 19:19, Sam James wrote:
2 >
3 >
4 >> On 22 Jul 2021, at 16:00, Alice <alicef@g.o> wrote:
5 >>
6 >>
7 >> Signed-off-by: Alice Ferrazzi <alicef@g.o>
8 >> ---
9 >> eclass/kernel-2.eclass | 13 +++++++++----
10 >> 1 file changed, 9 insertions(+), 4 deletions(-)
11 >
12 > Alice, thanks for taking the initiative to get this done and drop Python 2.7 here.
13 >
14 > It's much appreciated!
15 >
16 >>
17 >> diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass
18 >> index f94dd9c..05f8161 100644
19 >> --- a/eclass/kernel-2.eclass
20 >> +++ b/eclass/kernel-2.eclass
21 >> @@ -605,7 +605,7 @@ if [[ ${ETYPE} == sources ]]; then
22 >> kernel_is le 2 6 ${DEBLOB_MAX_VERSION} && \
23 >> K_DEBLOB_AVAILABLE=1
24 >> if [[ ${K_DEBLOB_AVAILABLE} == 1 ]]; then
25 >> - PYTHON_COMPAT=( python2_7 )
26 >> + PYTHON_COMPAT=( python3_{7..10} )
27 >
28 > I think others already said this, but Python 3.7 is a noop (eclasses ignore it), so just drop it.
29 >
30 >>
31 >> inherit python-any-r1
32 >>
33 >> @@ -1489,9 +1489,14 @@ kernel-2_src_compile() {
34 >> [[ ${ETYPE} == headers ]] && compile_headers
35 >>
36 >> if [[ ${K_DEBLOB_AVAILABLE} == 1 ]] && use deblob; then
37 >> - einfo ">>> Running deblob script ..."
38 >> - python_setup
39 >> - sh "${T}/${DEBLOB_A}" --force || die "Deblob script failed to run!!!"
40 >> + # deblob less than 5.10 require python 2.7
41 >> + if kernel_is lt 5 10; then
42 >> + ewarn "we don't support deblob for kernel less then 5.10"
43 >> + else
44 >> + einfo ">>> Running deblob script ..."
45 >> + python_setup
46 >> + sh "${T}/${DEBLOB_A}" --force || die "Deblob script failed to run!!!"
47 >> + fi
48 >> fi
49 >> }
50 >>
51 >
52 > I'd still prefer it if we just didn't provide the USE flag on irrelevant kernels (it's too confusing) but if you plan on removing this
53 > message at some point, I guess we can keep it?
54
55 I think the message text for the ewarn case could be a bit better. How
56 about instead of:
57
58 "we don't support deblob for kernel less then 5.10"
59
60 Something like:
61
62 "Deblob support requires a Linux kernel >=5.10"
63
64 Is used instead?
65
66 Also, the die message text can drop the triple exclamation marks. One
67 exclamation mark is enough.
68
69 And someone correct me if wrong, as I am reading this thread late, but
70 deblobbing is disabled by setting K_DEBLOB_AVAILABLE=0 in a kernel-2
71 inheritor ebuild, right? mips-sources can't support deblobbing, as several
72 of the SGI machines (IP27, IP30) are literally unbootable off of internal
73 drive bays if specific Qlogic firmware blobs don't get included in the
74 kernel image.
75
76 --
77 Joshua Kinard
78 Gentoo/MIPS
79 kumba@g.o
80 rsa6144/5C63F4E3F5C6C943 2015-04-27
81 177C 1972 1FB8 F254 BAD0 3E72 5C63 F4E3 F5C6 C943
82
83 "The past tempts us, the present confuses us, the future frightens us. And
84 our lives slip away, moment by moment, lost in that vast, terrible in-between."
85
86 --Emperor Turhan, Centauri Republic

Replies