From 31d3042487c7e1d61bcde37801d17e518ca88da0 Mon Sep 17 00:00:00 2001 From: Tim Orling Date: Mon, 28 Sep 2020 21:49:05 -0700 Subject: oeqa/selftest/cases/devtool.py: avoid .pyc race In certain conditions, most likely under heavy load on the AutoBuilder, the prebuilt .pyc files are attempting to be executed before they have been completely copied. Avoid this by not copying the .pyc files (nor the __pycache__ directory). The impact of python3-native recreating the .pyc files should hopefully be negligible. YOCTO#13421 YOCTO#13803 (From OE-Core rev: 4df098aeecd589ddd11a883e281285588a6966ca) Signed-off-by: Tim Orling Signed-off-by: Richard Purdie --- meta/lib/oeqa/selftest/cases/devtool.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'meta/lib') diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py index b383ed9c50..a3d2e9ea7c 100644 --- a/meta/lib/oeqa/selftest/cases/devtool.py +++ b/meta/lib/oeqa/selftest/cases/devtool.py @@ -56,7 +56,8 @@ def setUpModule(): if pth.startswith(canonical_layerpath): if relpth.endswith('/'): destdir = os.path.join(corecopydir, relpth) - shutil.copytree(pth, destdir) + # avoid race condition by not copying .pyc files YPBZ#13421,13803 + shutil.copytree(pth, destdir, ignore=ignore_patterns('*.pyc', '__pycache__')) else: destdir = os.path.join(corecopydir, os.path.dirname(relpth)) bb.utils.mkdirhier(destdir) -- cgit v1.2.3-54-g00ecf