summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorTim Orling <timothy.t.orling@linux.intel.com>2020-09-30 14:40:47 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-10-09 12:21:35 +0100
commit3c6611455c8f44e98756f7dbce50f9db4cf611cb (patch)
tree8abbe0bc0699107bc9a88e703ee237ab5572ddd4 /meta/lib
parent181eeebd958552cd4cfd0fbf14f2dd23365a20b7 (diff)
downloadpoky-3c6611455c8f44e98756f7dbce50f9db4cf611cb.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: 1facb696140cc95ea3478654aedf1220459c825f) Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> Signed-off-by: Steve Sakoman <steve@sakoman.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 5003f08c75..d8bf4aea08 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)