summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorTim Orling <timothy.t.orling@linux.intel.com>2020-09-28 21:49:05 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-30 15:01:51 +0100
commit31d3042487c7e1d61bcde37801d17e518ca88da0 (patch)
tree555a8195ca735e9844a67a1a9c16eed3e6465ccf /meta/lib
parent9d3b8770f2a852af57025a4064e1411471005e93 (diff)
downloadpoky-31d3042487c7e1d61bcde37801d17e518ca88da0.tar.gz
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 <timothy.t.orling@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/selftest/cases/devtool.py3
1 files changed, 2 insertions, 1 deletions
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():
56 if pth.startswith(canonical_layerpath): 56 if pth.startswith(canonical_layerpath):
57 if relpth.endswith('/'): 57 if relpth.endswith('/'):
58 destdir = os.path.join(corecopydir, relpth) 58 destdir = os.path.join(corecopydir, relpth)
59 shutil.copytree(pth, destdir) 59 # avoid race condition by not copying .pyc files YPBZ#13421,13803
60 shutil.copytree(pth, destdir, ignore=ignore_patterns('*.pyc', '__pycache__'))
60 else: 61 else:
61 destdir = os.path.join(corecopydir, os.path.dirname(relpth)) 62 destdir = os.path.join(corecopydir, os.path.dirname(relpth))
62 bb.utils.mkdirhier(destdir) 63 bb.utils.mkdirhier(destdir)