From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from yocto-www.yoctoproject.org (yocto-www.yoctoproject.org [140.211.169.56]) by mx.groups.io with SMTP id smtpd.web09.829.1577089320731370106 for ; Mon, 23 Dec 2019 00:22:01 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=softfail (domain: windriver.com, ip: 140.211.169.56, mailfrom: yi.zhao@windriver.com) Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 96BB6E0122A; Mon, 23 Dec 2019 00:22:00 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, * medium trust * [147.11.146.13 listed in list.dnswl.org] Received: from mail1.windriver.com (mail1.windriver.com [147.11.146.13]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 30AD3E01084 for ; Mon, 23 Dec 2019 00:21:59 -0800 (PST) Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail1.windriver.com (8.15.2/8.15.2) with ESMTPS id xBN8LwEm017317 (version=TLSv1 cipher=AES256-SHA bits=256 verify=FAIL); Mon, 23 Dec 2019 00:21:58 -0800 (PST) Received: from localhost (128.224.162.174) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server (TLS) id 14.3.468.0; Mon, 23 Dec 2019 00:21:58 -0800 From: "Yi Zhao" To: , , Subject: [meta-selinux][PATCH 2/6] libselinux-python: fix race issue in parallel build Date: Mon, 23 Dec 2019 16:21:48 +0800 Message-ID: <20191223082152.7706-2-yi.zhao@windriver.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191223082152.7706-1-yi.zhao@windriver.com> References: <20191223082152.7706-1-yi.zhao@windriver.com> MIME-Version: 1.0 X-Originating-IP: [128.224.162.174] Content-Type: text/plain The install-pywarp target doesn't depend on swigify target because the selinux.py is not generated by swigify target but pywrap target. Here is the dependency chain: install-pywrap -> pywrap -> $(SWIGFILES) -> $(SWIGPYOUT) -> $(SWIGCOUT) -> selinux.py But in the recipe, the swigify target is added explicitly in do_install: do_install_append() { oe_runmake install-pywrap swigify \ [snip] } This target will regenerate the selinux.py when do_install. So there will be a potential race issue in parallel build. The install-pywrap target is trying to install selinux.py when swigify target is generating the file. Then an empty selinux.py will be installed. Remove the target swigify to fix this issue. Signed-off-by: Yi Zhao --- recipes-security/selinux/libselinux-python.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-security/selinux/libselinux-python.inc b/recipes-security/selinux/libselinux-python.inc index 62354b2..24407e8 100644 --- a/recipes-security/selinux/libselinux-python.inc +++ b/recipes-security/selinux/libselinux-python.inc @@ -33,7 +33,7 @@ do_compile() { } do_install() { - oe_runmake install-pywrap swigify \ + oe_runmake install-pywrap \ PYCEXT='.so' \ PYLIBVER='python${PYTHON_BASEVERSION}${PYTHON_ABI}' \ PYTHONLIBDIR='${D}${libdir}/python${PYTHON_BASEVERSION}/site-packages' -- 2.17.1