[OE-core] Avoid race condition between do_unpack and do_deploy_archives in archiver.bbclass

Clemens Lang clemens.lang at bmw-carit.de
Thu Aug 13 09:09:15 UTC 2015


Hi,

the following patch fixes a race condition in archiver.bbclass that can
occur when a very specific set of preconditions is fulfilled:
 - a recipe sets $S to a directory that will be created by do_unpack
 - $B is at its default value of $S
 - the license of the recipe is in COPYLEFT_LICENSE_EXCLUDE, skipping
   source code archiving
When this happens, do_deploy_archives (which is a no-op task that only
prints a single line) does not depend indirectly on do_unpack, as it
would usually do via a dependency on
  do_ar_${@d.getVarFlag('ARCHIVER_MODE', 'src', True)}.
Because do_deploy_archives does not specify a working directory, it
defaults to $B, which does not exist when do_deploy_archives is run in
parallel (or before) do_unpack.

The attached patch fixes this by making do_deploy_archives run after
do_unpack in all cases (which is already does for recipes not excluded
due their license).

This problem is also present on dizzy (and thus probably also on fido).




More information about the Openembedded-core mailing list