mirror of
https://git.yoctoproject.org/poky
synced 2026-02-07 09:16:36 +01:00
python3: backport the full fix for importlib scanning invalid distributions
Even with our fixes in deterministic_imports.patch the
importlib.metadata package scan was still returning Distribution objects
for empty directories. This interacts badly with rebuilds when recipes
are changing as when a recipe is removed from the sysroot directories
are not removed[1].
In particular this breaks python3-meson-python-native rebuilds when
Meson upgrades from 1.7 to 1.8: the site-packages directory has an empty
meson-1.7.dist-info/ and populated meson-1.8.dist-info/. Whilst it's
deterministic to return the empty 1.7 first, this breaks pypa/build as
it looks through the distributions in order.
We had discussed this with upstream previously and there's a more
comprehensive fix upstream (actually in importlib_metadata, not cpython)
which ensures that valid distribution objects are listed first. So we
can drop our patch and replace it with a backport to fix these rebuilds.
[1] oe-core 4f94d929639 ("sstate/staging: Handle directory creation race issue")
(From OE-Core rev: 73de8daa6293403f5b92d313af32882c47bce396)
(From OE-Core rev: 1c1b651038e15445c495d87c38beeb92f00d9919)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
This commit is contained in:
committed by
Steve Sakoman
parent
66a51c233e
commit
9f837c5378
@@ -20,7 +20,7 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
|
||||
file://makerace.patch \
|
||||
file://0001-sysconfig.py-use-platlibdir-also-for-purelib.patch \
|
||||
file://0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch \
|
||||
file://deterministic_imports.patch \
|
||||
file://valid-dists.patch \
|
||||
file://0001-Avoid-shebang-overflow-on-python-config.py.patch \
|
||||
file://0001-Update-test_sysconfig-for-posix_user-purelib.patch \
|
||||
file://0001-skip-no_stdout_fileno-test-due-to-load-variability.patch \
|
||||
|
||||
Reference in New Issue
Block a user