From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6897960058005487616 X-Received: by 2002:a17:906:3092:: with SMTP id 18mr40773121ejv.43.1606056480162; Sun, 22 Nov 2020 06:48:00 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:906:b5b:: with SMTP id v27ls4962500ejg.7.gmail; Sun, 22 Nov 2020 06:47:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJwvktx+iPSUEIjK9ydGKF0hPAIjvSe6L/stbbQQ1Qdp8prOrUDT7bcyWthkC1ObvMfEaYHv X-Received: by 2002:a17:906:4e4b:: with SMTP id g11mr20251795ejw.244.1606056479117; Sun, 22 Nov 2020 06:47:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606056479; cv=none; d=google.com; s=arc-20160816; b=KcjQse6PSGtoqLhxXjb9dFRU0dYSGikO1SQ9w06L97XENZZLo5WpBcdR/UAnAg1Iqa 8197Iilym58YXufwOlPt0y1nm6Ox00X6GcctLZk62S5P++Sa4F82mdshIc70jJpuV/nY 0C0LlSUv4wPvd/4Usp08ywMmeftZza90Sq+vaQd1VvOnu8dxtRAEeS3SCDKF9Xlsz/8W VlhhQNojWMLiUKraOOtvjDpRr6KqmgBaBz2iMjODBXzuhLpYnbd2NzYxweWmxxtftTJT z0LqrQKMLO6+4kw8zXMndhy7P9HkrqkFV+UWCVnfSeoP9kf5iJaNf9APu1Zn7OIBfq96 RrQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:mime-version:user-agent :date:message-id:cc:to:subject:from; bh=S8bp2mXBO44Z0sLDv59rPA6HXHQWsQTSGcHbgqrseE0=; b=Bg1zjYB9YzpPPXq5On0+OJqjQMUheobWhxarFrE70kjTbGlw3gmhwoV2+JoS28UtGv t9bVHTJ4Ew+MDqe9ow9h2KRIbZjuatgf61+wSoQT5gDjLbGp1r++GgF+gW7GA3GXo3Bf spG4b2DXzYS5O7PZZ8gwUujYRpFzdw7jXtSoK4/iX0d240rSXndhCz8g0n9eSzR+Xf4D QEzogNzAj2JlR5y/qBKLw7G6Gr4mPHJsiSyEYfgO1zTbBkJavZK9jvdr85ho4LW7Ygai COrAhOCeRCyohkUp4lprrv/7svpmBWdNcYZBDEKQpxVKiVFdaJNnrJ3zBzz76DBH6c9t A44w== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from gecko.sbs.de (gecko.sbs.de. [194.138.37.40]) by gmr-mx.google.com with ESMTPS id ck1si238931ejb.0.2020.11.22.06.47.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 Nov 2020 06:47:59 -0800 (PST) Received-SPF: pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.40 as permitted sender) client-ip=194.138.37.40; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by gecko.sbs.de (8.15.2/8.15.2) with ESMTPS id 0AMElwJ2003205 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 22 Nov 2020 15:47:58 +0100 Received: from [167.87.38.29] ([167.87.38.29]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 0AMElvDA011297; Sun, 22 Nov 2020 15:47:58 +0100 From: Jan Kiszka Subject: [PATCH] wic: Remove racy python3 link cleanup To: isar-users , vijai kumar Cc: Henning Schild Message-ID: <978016c0-7cc4-f45d-4408-86b7b124af9b@siemens.com> Date: Sun, 22 Nov 2020 15:47:57 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: IvN2Knl6BqYG 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