public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: isar-users <isar-users@googlegroups.com>,
	vijai kumar <vijaikumar.kanagarajan@gmail.com>
Cc: Henning Schild <henning.schild@siemens.com>
Subject: [PATCH] wic: Remove racy python3 link cleanup
Date: Sun, 22 Nov 2020 15:47:57 +0100	[thread overview]
Message-ID: <978016c0-7cc4-f45d-4408-86b7b124af9b@siemens.com> (raw)

From: Jan Kiszka <jan.kiszka@siemens.com>

When two wic tasks run in parallel, one can pull the carpet under the
other by removing python3-native. We could lock everything but it's
simpler to just keep the links around. They won't do any harm as they
are only part of the buildchroot.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 meta/classes/wic-img.bbclass | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/meta/classes/wic-img.bbclass b/meta/classes/wic-img.bbclass
index 2275ebec..bbf5dd8a 100644
--- a/meta/classes/wic-img.bbclass
+++ b/meta/classes/wic-img.bbclass
@@ -164,17 +164,16 @@ EOSUDO
           # The python path is hard-coded as /usr/bin/python3-native/python3 in wic. Handle that.
           mkdir -p /usr/bin/python3-native/
           if [ $(head -1 $(which bmaptool) | grep python3) ];then
-            ln -s /usr/bin/python3 /usr/bin/python3-native/python3
+            ln -fs /usr/bin/python3 /usr/bin/python3-native/python3
           else
-            ln -s /usr/bin/python2 /usr/bin/python3-native/python3
+            ln -fs /usr/bin/python2 /usr/bin/python3-native/python3
           fi
           export PATH="$BITBAKEDIR/bin:$PATH"
           "$SCRIPTSDIR"/wic create "$WKS_FULL_PATH" \
             --vars "$STAGING_DIR/$MACHINE/imgdata/" \
             -o "/$WICTMP/${IMAGE_FULLNAME}.wic/" \
             --bmap \
-            -e "$IMAGE_BASENAME" $@
-          rm -rf /usr/bin/python3-native' \
+            -e "$IMAGE_BASENAME" $@' \
               my_script "${BITBAKEDIR}" "${SCRIPTSDIR}" "${WKS_FULL_PATH}" "${STAGING_DIR}" \
               "${MACHINE}" "${WICTMP}" "${IMAGE_FULLNAME}" "${IMAGE_BASENAME}" \
               ${WIC_CREATE_EXTRA_ARGS}
-- 
2.26.2

             reply	other threads:[~2020-11-22 14:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-22 14:47 Jan Kiszka [this message]
2020-11-25  9:27 ` vijaikumar....@gmail.com
2020-11-25 18:59 ` Baurzhan Ismagulov

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=978016c0-7cc4-f45d-4408-86b7b124af9b@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=henning.schild@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=vijaikumar.kanagarajan@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox