At the moment, during the "Preparing build system" phase of the extensible SDK installation, we invoke bitbake once with --setscene-only to install available items from sstate, and then a second time with -n to check if any tasks are going to execute (i.e. verifying that the first invocation installed everything necessary from sstate). When everything works as it should this is functional, however it does cause some problems: 1) Running bitbake twice means we incur more certain time-consuming tasks twice, most significantly the "checking for sstate artifacts", "Preparing RunQueue" and other early steps of the build process. This is amplified if the SDK was constructed with SDK_INCLUDE_PKGDATA = "1" because then we're effectively considering the "world" target each time. 2) If we fail at the second stage we no longer have any error context as to what failed, and it's taken quite a long time to get to the point where we can tell the user something is wrong. It would be much better if we could do this in one invocation. If we were to introduce a mode to BitBake enable this, the desired functionality is as follows: * All shared state tasks required to satisfy the specified targets (excluding those which are "covered") must be able to be satisfied from sstate. * A setscene failure (or failure to fetch an sstate package for any other reason than it not existing) should trigger an immediate failure, not just a warning. * Only setscene tasks can run, but we check that there are no non-sstate tasks other than those in a whitelist that are expected to run; if there are any such tasks then we should fail with an error listing the tasks. This is really something that needs to be enabled on invocation rather than more permanently through configuration, so it would probably need to be enabled through an additional command line option (though I realise we probably have too many already).
Now implemented in master: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=f3b62c1c2e47968084342d1fe2a9af596a3ba93c http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=6677dd37ad3b1cdb8d805511c7a6234452ab77ad http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=a702c68c5bd7ab25d74d861bb0dc88249d4d742e In the end I did opt for a variable.