All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anuj Mittal <anuj.mittal@intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [honister][PATCH 23/24] meson.bblcass: Remove empty egg-info directories before running meson
Date: Wed,  3 Nov 2021 00:44:11 +0800	[thread overview]
Message-ID: <0abc761e84ea25a4acc7633eb9b5c8ae73120116.1635871270.git.anuj.mittal@intel.com> (raw)
In-Reply-To: <cover.1635871270.git.anuj.mittal@intel.com>

From: Peter Kjellerstedt <peter.kjellerstedt@axis.com>

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>
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>
---
 meta/classes/meson.bbclass | 10 ++++++++++
 1 file changed, 10 insertions(+)

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() {
     # 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. Ignore
+    # all errors from rmdir since the egg-info may be a file rather than a
+    # directory.
+    rmdir ${STAGING_LIBDIR_NATIVE}/${PYTHON_DIR}/site-packages/*.egg-info 2>/dev/null || :
+
     # Work around "Meson fails if /tmp is mounted with noexec #2972"
     mkdir -p "${B}/meson-private/tmp"
     export TMPDIR="${B}/meson-private/tmp"
-- 
2.31.1



  parent reply	other threads:[~2021-11-02 16:45 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-02 16:43 [honister][PATCH 00/24] Review request Anuj Mittal
2021-11-02 16:43 ` [honister][PATCH 01/24] python3-setuptools: _distutils/sysconfig fix Anuj Mittal
2021-11-02 16:43 ` [honister][PATCH 02/24] waffle: convert to git, website is down Anuj Mittal
2021-11-02 16:43 ` [honister][PATCH 03/24] strace: show test suite log on failure Anuj Mittal
2021-11-02 16:43 ` [honister][PATCH 04/24] classes/populate_sdk_base: Add setscene tasks Anuj Mittal
2021-11-02 16:43 ` [honister][PATCH 05/24] staging: Fix autoconf-native rebuild failure Anuj Mittal
2021-11-02 16:43 ` [honister][PATCH 06/24] linux-yocto/5.10: update to v5.10.73 Anuj Mittal
2021-11-02 16:43 ` [honister][PATCH 07/24] linux-yocto/5.14: update to v5.14.12 Anuj Mittal
2021-11-02 16:43 ` [honister][PATCH 08/24] linux-yocto/5.14: update to v5.14.13 Anuj Mittal
2021-11-02 16:43 ` [honister][PATCH 09/24] linux-yocto/5.10: update to v5.10.74 Anuj Mittal
2021-11-02 16:43 ` [honister][PATCH 10/24] linux-yocto/5.14: common-pc: enable CONFIG_ATA_PIIX as built-in Anuj Mittal
2021-11-02 16:43 ` [honister][PATCH 11/24] linux-yocto/5.14: update to v5.14.14 Anuj Mittal
2021-11-02 16:44 ` [honister][PATCH 12/24] linux-yocto/5.10: update to v5.10.75 Anuj Mittal
2021-11-02 16:44 ` [honister][PATCH 13/24] meson: move lang args to the right section Anuj Mittal
2021-11-02 16:44 ` [honister][PATCH 14/24] meson: install native file in sdk Anuj Mittal
2021-11-02 16:44 ` [honister][PATCH 15/24] go.bbclass: Allow adding parameters to go ldflags Anuj Mittal
2021-11-02 16:44 ` [honister][PATCH 16/24] stress-ng: convert to git, website is down Anuj Mittal
2021-11-02 16:44 ` [honister][PATCH 17/24] tzdata: upgrade 2021a -> 2021d Anuj Mittal
2021-11-02 16:44 ` [honister][PATCH 18/24] tzdata: update 2021d -> 2021e Anuj Mittal
2021-11-02 16:44 ` [honister][PATCH 19/24] spdx.py: Add annotation to relationship Anuj Mittal
2021-11-02 16:44 ` [honister][PATCH 20/24] create-spdx: add create_annotation function Anuj Mittal
2021-11-02 16:44 ` [honister][PATCH 21/24] create-spdx: cross recipes are native also Anuj Mittal
2021-11-02 16:44 ` [honister][PATCH 22/24] oeqa/runtime/parselogs: modified drm error in common errors list Anuj Mittal
2021-11-02 16:44 ` Anuj Mittal [this message]
2021-11-02 16:44 ` [honister][PATCH 24/24] qemu.inc: Remove empty egg-info directories before running meson Anuj Mittal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0abc761e84ea25a4acc7633eb9b5c8ae73120116.1635871270.git.anuj.mittal@intel.com \
    --to=anuj.mittal@intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.