Gentoo Archives: gentoo-dev

From: Alice Ferrazzi <alicef@g.o>
To: gentoo-dev@l.g.o
Cc: Alice Ferrazzi <alicef@g.o>
Subject: [gentoo-dev] [PATCH] kernel-2.eclass: Force deblob-check to use awk
Date: Wed, 27 Jul 2022 10:09:17
Message-Id: 20220727100855.85895-1-alicef@gentoo.org
1 This patch remove python from the kernel-2.eclass
2 by forcing the deblob-check script to use awk instead
3 of python.
4
5 Closes: https://bugs.gentoo.org/610008
6
7 Signed-off-by: Alice Ferrazzi <alicef@g.o>
8 ---
9 eclass/kernel-2.eclass | 14 +++-----------
10 1 file changed, 3 insertions(+), 11 deletions(-)
11
12 diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass
13 index b3fb5cef76c..50464470a9b 100644
14 --- a/eclass/kernel-2.eclass
15 +++ b/eclass/kernel-2.eclass
16 @@ -675,15 +675,7 @@ if [[ ${ETYPE} == sources ]]; then
17
18 # Bug #266157, deblob for libre support
19 if [[ -z ${K_PREDEBLOBBED} ]]; then
20 - # deblob less than 5.10 require python 2.7
21 - if kernel_is lt 5 10; then
22 - K_DEBLOB_AVAILABLE=0
23 - fi
24 if [[ ${K_DEBLOB_AVAILABLE} == 1 ]]; then
25 - PYTHON_COMPAT=( python3_{8..10} )
26 -
27 - inherit python-any-r1
28 -
29 IUSE="${IUSE} deblob"
30
31 # Reflect that kernels contain firmware blobs unless otherwise
32 @@ -691,8 +683,6 @@ if [[ ${ETYPE} == sources ]]; then
33 # tree has been dropped from the kernel.
34 kernel_is lt 4 14 && LICENSE+=" !deblob? ( linux-firmware )"
35
36 - BDEPEND+=" deblob? ( ${PYTHON_DEPS} )"
37 -
38 if [[ -n KV_MINOR ]]; then
39 DEBLOB_PV="${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
40 else
41 @@ -1470,8 +1460,10 @@ kernel-2_src_compile() {
42 cd "${S}" || die
43
44 if [[ ${K_DEBLOB_AVAILABLE} == 1 ]] && use deblob; then
45 + einfo ">>> Patching deblob script for forcing awk ..."
46 + sed -i '/check="\/bin\/sh $check"/a \ check="$check --use-awk"' \
47 + "${T}/${DEBLOB_A}" || die "Failed to patch ${DEBLOB_A}"
48 einfo ">>> Running deblob script ..."
49 - python_setup
50 sh "${T}/${DEBLOB_A}" --force || die "Deblob script failed to run!!!"
51 fi
52 }
53 --
54 2.35.1