summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/qemu/qemu/no-pip.patch
blob: 92b2edbe9f51c7f6385d85f6e5e503ffc7aa939f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
qemu: Ensure pip and the python venv aren't used for meson

Qemu wants to use a supported python version and a specific meson version
to "help" users and uses pip and creates a venv to do this. This is a nightmare
for us. Our versions stay up to date and should be supported so we don't
really need/want this wrapping. Tweak things to disable it.

There was breakage from the wrapper shown by:

bitbake qemu-system-native
<add DISTRO_FEATURES:remove = "opengl" to local.conf>
bitbake qemu-system-native -c configure

which would crash. The issue is the change in configuration removes pieces
from the sysroot but pyc files remainm as do pieces of pip which causes
problems.

Ideally we'd convince upstream to allow some way to disable the venv on
the understanding that if/when it breaks, we keep the pieces. The patch
as it stands is a workaround.

Upstream-Status: Inappropriate [oe specific]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

Index: qemu-8.2.0/configure
===================================================================
--- qemu-8.2.0.orig/configure
+++ qemu-8.2.0/configure
@@ -937,7 +937,7 @@ python="$(command -v "$python")"
 echo "python determined to be '$python'"
 echo "python version: $($python --version)"
 
-python="$($python -B "${source_path}/python/scripts/mkvenv.py" create pyvenv)"
+python=python3
 if test "$?" -ne 0 ; then
     error_exit "python venv creation failed"
 fi
@@ -945,6 +945,7 @@ fi
 # Suppress writing compiled files
 python="$python -B"
 mkvenv="$python ${source_path}/python/scripts/mkvenv.py"
+mkvenv=true
 
 # Finish preparing the virtual environment using vendored .whl files