[OE-core] [PATCH 1/1] tinfoil.py: Check if BUILDDIR exists
Amanda Brindle
amanda.r.brindle at intel.com
Thu Jan 18 23:45:24 UTC 2018
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.brindle at 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
More information about the Openembedded-core
mailing list