* [PATCH] wic: Remove racy python3 link cleanup
@ 2020-11-22 14:47 Jan Kiszka
2020-11-25 9:27 ` vijaikumar....@gmail.com
2020-11-25 18:59 ` Baurzhan Ismagulov
0 siblings, 2 replies; 3+ messages in thread
From: Jan Kiszka @ 2020-11-22 14:47 UTC (permalink / raw)
To: isar-users, vijai kumar; +Cc: Henning Schild
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] wic: Remove racy python3 link cleanup
2020-11-22 14:47 [PATCH] wic: Remove racy python3 link cleanup Jan Kiszka
@ 2020-11-25 9:27 ` vijaikumar....@gmail.com
2020-11-25 18:59 ` Baurzhan Ismagulov
1 sibling, 0 replies; 3+ messages in thread
From: vijaikumar....@gmail.com @ 2020-11-25 9:27 UTC (permalink / raw)
To: isar-users
[-- Attachment #1.1: Type: text/plain, Size: 1747 bytes --]
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>
[-- Attachment #1.2: Type: text/html, Size: 2388 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] wic: Remove racy python3 link cleanup
2020-11-22 14:47 [PATCH] wic: Remove racy python3 link cleanup Jan Kiszka
2020-11-25 9:27 ` vijaikumar....@gmail.com
@ 2020-11-25 18:59 ` Baurzhan Ismagulov
1 sibling, 0 replies; 3+ messages in thread
From: Baurzhan Ismagulov @ 2020-11-25 18:59 UTC (permalink / raw)
To: isar-users
On Sun, Nov 22, 2020 at 03:47:57PM +0100, Jan Kiszka wrote:
> 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>
> Reviewed-by: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
Applied to next, thanks.
With kind regards,
Baurzhan.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-11-25 18:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-22 14:47 [PATCH] wic: Remove racy python3 link cleanup Jan Kiszka
2020-11-25 9:27 ` vijaikumar....@gmail.com
2020-11-25 18:59 ` Baurzhan Ismagulov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox