Check if BUILDDIR exists in order to deterimine if a tinfoil using script is running without having called oe-init-build-env (or similar). If not, instruct user to initialise the build environment, and then error out immediately. Before, tinfoil would hang for 30s before erroring out.
Fixes [YOCTO #12096] Signed-off-by: Amanda Brindle <amanda.r.brin...@intel.com> --- bitbake/lib/bb/tinfoil.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bitbake/lib/bb/tinfoil.py b/bitbake/lib/bb/tinfoil.py index 368264f..e156b47 100644 --- a/bitbake/lib/bb/tinfoil.py +++ b/bitbake/lib/bb/tinfoil.py @@ -372,6 +372,11 @@ class Tinfoil: """ self.quiet = quiet + basepath = os.environ.get('BUILDDIR') + if not basepath: + print("Tinfoil can only be run after initialising the build environment (e.g. by using oe-init-build-env)") + sys.exit(1) + if self.tracking: extrafeatures = [bb.cooker.CookerFeatures.BASEDATASTORE_TRACKING] else: -- 2.7.4 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core