summaryrefslogtreecommitdiffstats
path: root/meta/classes/siteinfo.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-02-12 14:50:11 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-02-13 14:49:36 +0000
commitcefc40389e3185c3728c8154dae602a4a11e2f55 (patch)
tree3677563d0e8e9d535980b6f4f43a014e55e9972b /meta/classes/siteinfo.bbclass
parent231d4a9d3d89af4b1b5f6ea439c630e4cac82079 (diff)
downloadpoky-cefc40389e3185c3728c8154dae602a4a11e2f55.tar.gz
autotools/siteinfo: Avoid races over siteinfo files
If a siteinfo enabled tasks re-executes at the wrong moment whilst something else is in do_configure, the _config files can be removed which upsets autoconf and causes build failures. Use the same approach as we do for dealing with the aclocal files. We already parse the manifests so look out any *_config files and if so, copy them, then reference the copy from siteinfo instead. This has the advantage of also being more deterministic. [YOCTO #7101] (From OE-Core rev: c8b7aad133c3e3319345d50f85a91cbd5116f842) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/siteinfo.bbclass')
-rw-r--r--meta/classes/siteinfo.bbclass8
1 files changed, 6 insertions, 2 deletions
diff --git a/meta/classes/siteinfo.bbclass b/meta/classes/siteinfo.bbclass
index b41db46bc0..2c1f9d07fc 100644
--- a/meta/classes/siteinfo.bbclass
+++ b/meta/classes/siteinfo.bbclass
@@ -150,9 +150,13 @@ def siteinfo_get_files(d, no_cache = False):
150 if no_cache: return sitefiles 150 if no_cache: return sitefiles
151 151
152 # Now check for siteconfig cache files 152 # Now check for siteconfig cache files
153 path_siteconfig = d.getVar('SITECONFIG_SYSROOTCACHE', True) 153 # Use the files copied to the aclocal cache generated by autotools.bbclass
154 if os.path.isdir(path_siteconfig): 154 # to avoid races
155 path_siteconfig = d.getVar('ACLOCALDIR', True)
156 if path_siteconfig and os.path.isdir(path_siteconfig):
155 for i in os.listdir(path_siteconfig): 157 for i in os.listdir(path_siteconfig):
158 if not i.endswith("_config"):
159 continue
156 filename = os.path.join(path_siteconfig, i) 160 filename = os.path.join(path_siteconfig, i)
157 sitefiles += filename + " " 161 sitefiles += filename + " "
158 162