]> code.ossystems Code Review - openembedded-core.git/commit
autotools/siteinfo: Tweak CONFIG_SITE handling for determism/races
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 21 Sep 2016 10:53:57 +0000 (11:53 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 22 Sep 2016 10:08:23 +0000 (11:08 +0100)
commit3207244004c612c1a0e13921251003e5e635d1b1
treebf8e99cb9c8c7d467f829f40d6665ee859c663ec
parentf60fc2dc231ffc8cbf5939b0dbfa06c5fe805b86
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/autotools.bbclass
meta/classes/siteinfo.bbclass
meta/classes/toolchain-scripts.bbclass