diff options
author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2021-10-25 16:07:13 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-11-08 23:41:00 +0000 |
commit | 0979299bb9e5c94e292f5964954252140f9956f7 (patch) | |
tree | 01c8cac87d8c32c9bd5b6038ea9f6436f589db20 /meta/classes | |
parent | a10db5945ecd2f10f05d178a589c54b9fc6b8b75 (diff) | |
download | poky-0979299bb9e5c94e292f5964954252140f9956f7.tar.gz |
meson.bblcass: Remove empty egg-info directories before running meson
sstate.bbclass no longer removes empty directories to avoid a race (see
commit 4f94d929 "sstate/staging: Handle directory creation race issue").
Unfortunately Python apparently treats an empty egg-info directory as if
the version it previously contained still exists and fails if a newer
version is required, which Meson does. To avoid this, make sure there
are no empty egg-info directories from previous versions left behind.
(From OE-Core rev: 0abc761e84ea25a4acc7633eb9b5c8ae73120116)
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 47d9d90b4ec7d04d6f3f1a9b97c0ab7f1264a88e)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/meson.bbclass | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/meta/classes/meson.bbclass b/meta/classes/meson.bbclass index e124d18144..da58cb4bec 100644 --- a/meta/classes/meson.bbclass +++ b/meta/classes/meson.bbclass | |||
@@ -103,6 +103,16 @@ meson_do_configure() { | |||
103 | # https://github.com/mesonbuild/meson/commit/ef9aeb188ea2bc7353e59916c18901cde90fa2b3 | 103 | # https://github.com/mesonbuild/meson/commit/ef9aeb188ea2bc7353e59916c18901cde90fa2b3 |
104 | unset LD | 104 | unset LD |
105 | 105 | ||
106 | # sstate.bbclass no longer removes empty directories to avoid a race (see | ||
107 | # commit 4f94d929 "sstate/staging: Handle directory creation race issue"). | ||
108 | # Unfortunately Python apparently treats an empty egg-info directory as if | ||
109 | # the version it previously contained still exists and fails if a newer | ||
110 | # version is required, which Meson does. To avoid this, make sure there are | ||
111 | # no empty egg-info directories from previous versions left behind. Ignore | ||
112 | # all errors from rmdir since the egg-info may be a file rather than a | ||
113 | # directory. | ||
114 | rmdir ${STAGING_LIBDIR_NATIVE}/${PYTHON_DIR}/site-packages/*.egg-info 2>/dev/null || : | ||
115 | |||
106 | # Work around "Meson fails if /tmp is mounted with noexec #2972" | 116 | # Work around "Meson fails if /tmp is mounted with noexec #2972" |
107 | mkdir -p "${B}/meson-private/tmp" | 117 | mkdir -p "${B}/meson-private/tmp" |
108 | export TMPDIR="${B}/meson-private/tmp" | 118 | export TMPDIR="${B}/meson-private/tmp" |