diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-12-19 21:24:57 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-12-21 10:38:30 +0000 |
commit | c270131c530eb0207391203ba501e6f8af6cda21 (patch) | |
tree | 676550375de5838bcd0db1b01d40ec1c541bfdc0 /meta/recipes-devtools/qemu | |
parent | 85c88f8332502ca295d9dcf3dc978f27b3d31eb4 (diff) | |
download | poky-c270131c530eb0207391203ba501e6f8af6cda21.tar.gz |
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.
(From OE-Core rev: aceef7785e637a0223ecf288e2f367b6bee4a505)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/qemu')
-rw-r--r-- | meta/recipes-devtools/qemu/qemu.inc | 1 | ||||
-rw-r--r-- | meta/recipes-devtools/qemu/qemu/no-pip.patch | 45 |
2 files changed, 46 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc index 9e187a0995..70515d980e 100644 --- a/meta/recipes-devtools/qemu/qemu.inc +++ b/meta/recipes-devtools/qemu/qemu.inc | |||
@@ -34,6 +34,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ | |||
34 | file://fixedmeson.patch \ | 34 | file://fixedmeson.patch \ |
35 | file://fixmips.patch \ | 35 | file://fixmips.patch \ |
36 | file://0001-vfio-Include-libgen.h-for-basename-API.patch \ | 36 | file://0001-vfio-Include-libgen.h-for-basename-API.patch \ |
37 | file://no-pip.patch \ | ||
37 | file://qemu-guest-agent.init \ | 38 | file://qemu-guest-agent.init \ |
38 | file://qemu-guest-agent.udev \ | 39 | file://qemu-guest-agent.udev \ |
39 | " | 40 | " |
diff --git a/meta/recipes-devtools/qemu/qemu/no-pip.patch b/meta/recipes-devtools/qemu/qemu/no-pip.patch new file mode 100644 index 0000000000..f52b4e4b83 --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu/no-pip.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | qemu: Ensure pip and the python venv aren't used for meson | ||
2 | |||
3 | Qemu wants to use a supported python version and a specific meson version | ||
4 | to "help" users and uses pip and creates a venv to do this. This is a nightmare | ||
5 | for us. Our versions stay up to date and should be supported so we don't | ||
6 | really need/want this wrapping. Tweak things to disable it. | ||
7 | |||
8 | There was breakage from the wrapper shown by: | ||
9 | |||
10 | bitbake qemu-system-native | ||
11 | <add DISTRO_FEATURES:remove = "opengl" to local.conf> | ||
12 | bitbake qemu-system-native -c configure | ||
13 | |||
14 | which would crash. The issue is the change in configuration removes pieces | ||
15 | from the sysroot but pyc files remainm as do pieces of pip which causes | ||
16 | problems. | ||
17 | |||
18 | Ideally we'd convince upstream to allow some way to disable the venv on | ||
19 | the understanding that if/when it breaks, we keep the pieces. The patch | ||
20 | as it stands is a workaround. | ||
21 | |||
22 | Upstream-Status: Inappropriate [oe specific] | ||
23 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
24 | |||
25 | diff --git a/configure b/configure | ||
26 | index 133f4e3235..e4c144b4e2 100755 | ||
27 | --- a/configure | ||
28 | +++ b/configure | ||
29 | @@ -1009,7 +1009,7 @@ python="$(command -v "$python")" | ||
30 | echo "python determined to be '$python'" | ||
31 | echo "python version: $($python --version)" | ||
32 | |||
33 | -python="$($python -B "${source_path}/python/scripts/mkvenv.py" create pyvenv)" | ||
34 | +python=python3 | ||
35 | if test "$?" -ne 0 ; then | ||
36 | error_exit "python venv creation failed" | ||
37 | fi | ||
38 | @@ -1017,6 +1017,7 @@ fi | ||
39 | # Suppress writing compiled files | ||
40 | python="$python -B" | ||
41 | mkvenv="$python ${source_path}/python/scripts/mkvenv.py" | ||
42 | +mkvenv=true | ||
43 | |||
44 | mkvenv_flags="" | ||
45 | if test "$download" = "enabled" ; then | ||