All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] meson.bblcass: Remove empty egg-info directories before running meson
@ 2021-10-20 14:11 Peter Kjellerstedt
  2021-10-23 10:22 ` [OE-core] " Alexandre Belloni
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Kjellerstedt @ 2021-10-20 14:11 UTC (permalink / raw)
  To: openembedded-core

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.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---

RP: This is the solution I came up with regarding our discussion at the
meeting yesterday. With this in place the upgrade to meson 0.59.1 now
went without a hitch.

 meta/classes/meson.bbclass | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/meta/classes/meson.bbclass b/meta/classes/meson.bbclass
index e124d18144..d07b34fc5e 100644
--- a/meta/classes/meson.bbclass
+++ b/meta/classes/meson.bbclass
@@ -103,6 +103,14 @@ meson_do_configure() {
     # https://github.com/mesonbuild/meson/commit/ef9aeb188ea2bc7353e59916c18901cde90fa2b3
     unset LD
 
+    # 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.
+    rmdir --ignore-fail-on-non-empty ${STAGING_LIBDIR_NATIVE}/${PYTHON_DIR}/site-packages/*.egg-info
+
     # Work around "Meson fails if /tmp is mounted with noexec #2972"
     mkdir -p "${B}/meson-private/tmp"
     export TMPDIR="${B}/meson-private/tmp"


^ permalink raw reply related	[flat|nested] 4+ messages in thread
[parent not found: <16AFC2867DC0EAA4.1370@lists.openembedded.org>]

end of thread, other threads:[~2021-10-25 13:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-20 14:11 [PATCH] meson.bblcass: Remove empty egg-info directories before running meson Peter Kjellerstedt
2021-10-23 10:22 ` [OE-core] " Alexandre Belloni
2021-10-25 13:55   ` Peter Kjellerstedt
     [not found] <16AFC2867DC0EAA4.1370@lists.openembedded.org>
2021-10-21  2:20 ` Peter Kjellerstedt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.