On 7/25/2021 19:19, Sam James wrote:
> 
> 
>> On 22 Jul 2021, at 16:00, Alice <ali...@gentoo.org> wrote:
>>
>>
>> Signed-off-by: Alice Ferrazzi <ali...@gentoo.org>
>> ---
>> eclass/kernel-2.eclass | 13 +++++++++----
>> 1 file changed, 9 insertions(+), 4 deletions(-)
> 
> Alice, thanks for taking the initiative to get this done and drop Python 2.7 
> here.
> 
> It's much appreciated!
> 
>>
>> diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass
>> index f94dd9c..05f8161 100644
>> --- a/eclass/kernel-2.eclass
>> +++ b/eclass/kernel-2.eclass
>> @@ -605,7 +605,7 @@ if [[ ${ETYPE} == sources ]]; then
>>                                kernel_is le 2 6 ${DEBLOB_MAX_VERSION} && \
>>                                        K_DEBLOB_AVAILABLE=1
>>                if [[ ${K_DEBLOB_AVAILABLE} == 1 ]]; then
>> -                       PYTHON_COMPAT=( python2_7 )
>> +                       PYTHON_COMPAT=( python3_{7..10} )
> 
> I think others already said this, but Python 3.7 is a noop (eclasses ignore 
> it), so just drop it.
> 
>>
>>                        inherit python-any-r1
>>
>> @@ -1489,9 +1489,14 @@ kernel-2_src_compile() {
>>        [[ ${ETYPE} == headers ]] && compile_headers
>>
>>        if [[ ${K_DEBLOB_AVAILABLE} == 1 ]] && use deblob; then
>> -               einfo ">>> Running deblob script ..."
>> -               python_setup
>> -               sh "${T}/${DEBLOB_A}" --force || die "Deblob script failed 
>> to run!!!"
>> +               # deblob less than 5.10 require python 2.7
>> +               if kernel_is lt 5 10; then
>> +                       ewarn "we don't support deblob for kernel less then 
>> 5.10"
>> +               else
>> +                       einfo ">>> Running deblob script ..."
>> +                       python_setup
>> +                       sh "${T}/${DEBLOB_A}" --force || die "Deblob script 
>> failed to run!!!"
>> +               fi
>>        fi
>> }
>>
> 
> 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
> message at some point, I guess we can keep it?

I think the message text for the ewarn case could be a bit better.  How
about instead of:

    "we don't support deblob for kernel less then 5.10"

Something like:

    "Deblob support requires a Linux kernel >=5.10"

Is used instead?

Also, the die message text can drop the triple exclamation marks.  One
exclamation mark is enough.

And someone correct me if wrong, as I am reading this thread late, but
deblobbing is disabled by setting K_DEBLOB_AVAILABLE=0 in a kernel-2
inheritor ebuild, right?  mips-sources can't support deblobbing, as several
of the SGI machines (IP27, IP30) are literally unbootable off of internal
drive bays if specific Qlogic firmware blobs don't get included in the
kernel image.

-- 
Joshua Kinard
Gentoo/MIPS
ku...@gentoo.org
rsa6144/5C63F4E3F5C6C943 2015-04-27
177C 1972 1FB8 F254 BAD0 3E72 5C63 F4E3 F5C6 C943

"The past tempts us, the present confuses us, the future frightens us.  And
our lives slip away, moment by moment, lost in that vast, terrible in-between."

--Emperor Turhan, Centauri Republic

Reply via email to