From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6897960058005487616 Date: Wed, 25 Nov 2020 01:27:28 -0800 (PST) From: "vijaikumar....@gmail.com" To: isar-users Message-Id: In-Reply-To: <978016c0-7cc4-f45d-4408-86b7b124af9b@siemens.com> References: <978016c0-7cc4-f45d-4408-86b7b124af9b@siemens.com> Subject: Re: [PATCH] wic: Remove racy python3 link cleanup MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1274_999854910.1606296448418" X-TUID: cl0pwpuSBpsy ------=_Part_1274_999854910.1606296448418 Content-Type: multipart/alternative; boundary="----=_Part_1275_473823823.1606296448418" ------=_Part_1275_473823823.1606296448418 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On Sunday, November 22, 2020 at 8:18:00 PM UTC+5:30 Jan Kiszka wrote: > From: Jan Kiszka > > 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 > --- > 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 > Reviewed-by: Vijai Kumar K ------=_Part_1275_473823823.1606296448418 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit

On Sunday, November 22, 2020 at 8:18:00 PM UTC+5:30 Jan Kiszka wrote:
From: Jan Kiszka <jan.k...@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.k...@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

Reviewed-by: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com> 
------=_Part_1275_473823823.1606296448418-- ------=_Part_1274_999854910.1606296448418--