diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-09-21 11:53:57 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-09-22 11:13:24 +0100 |
commit | 577ff4e3dd4efe3b129a10eabedf620cfb7a2fa8 (patch) | |
tree | 200a9cf45efe8c39c559099c353634d5d9939caf /meta/classes/autotools.bbclass | |
parent | 99284c3c8316ce1ae042eaf5909106a241dc6e36 (diff) | |
download | poky-577ff4e3dd4efe3b129a10eabedf620cfb7a2fa8.tar.gz |
autotools/siteinfo: Tweak CONFIG_SITE handling for determism/races
As things stand there are multiple races in the CONFIG_SITE handling
where checksums can change depending on whether site directories
exist or not when parsing happens. This is bad.
Secondly, there is a build race that occurs if you build virtuals
in parallel with the "main" recipe, since the main recipe is parsed
when the virtual is (since it sets variables like BBCLASSEXTEND)
and with the current code, it may look for files and directories
which could be created/destroyed which the loop is executing. This
is also bad.
The aclocal-copy directory should only ever be accessed by the call
from autotools.bbclass. This changes the parameter name to make it
clear and ensures all callers have the right usage, neatly avoiding
all the problems above. Also added better comments.
(From OE-Core rev: 3207244004c612c1a0e13921251003e5e635d1b1)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/autotools.bbclass')
-rw-r--r-- | meta/classes/autotools.bbclass | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass index 4c32c84fa8..e5f527ec07 100644 --- a/meta/classes/autotools.bbclass +++ b/meta/classes/autotools.bbclass | |||
@@ -25,7 +25,7 @@ inherit siteinfo | |||
25 | 25 | ||
26 | # Space separated list of shell scripts with variables defined to supply test | 26 | # Space separated list of shell scripts with variables defined to supply test |
27 | # results for autoconf tests we cannot run at build time. | 27 | # results for autoconf tests we cannot run at build time. |
28 | export CONFIG_SITE = "${@siteinfo_get_files(d, False)}" | 28 | export CONFIG_SITE = "${@siteinfo_get_files(d)}" |
29 | 29 | ||
30 | acpaths = "default" | 30 | acpaths = "default" |
31 | EXTRA_AUTORECONF = "--exclude=autopoint" | 31 | EXTRA_AUTORECONF = "--exclude=autopoint" |
@@ -253,8 +253,9 @@ python autotools_copy_aclocals () { | |||
253 | t = os.path.join(aclocaldir, os.path.basename(c)) | 253 | t = os.path.join(aclocaldir, os.path.basename(c)) |
254 | if not os.path.exists(t): | 254 | if not os.path.exists(t): |
255 | os.symlink(c, t) | 255 | os.symlink(c, t) |
256 | 256 | ||
257 | d.setVar("CONFIG_SITE", siteinfo_get_files(d, False)) | 257 | # Refresh variable with cache files |
258 | d.setVar("CONFIG_SITE", siteinfo_get_files(d, aclocalcache=True)) | ||
258 | } | 259 | } |
259 | autotools_copy_aclocals[vardepsexclude] += "MACHINE SDK_ARCH BUILD_ARCH SDK_OS BB_TASKDEPDATA" | 260 | autotools_copy_aclocals[vardepsexclude] += "MACHINE SDK_ARCH BUILD_ARCH SDK_OS BB_TASKDEPDATA" |
260 | 261 | ||