Skip to contentSkip to conversation

cookerdata: print an error if layer dir does not exist

PATCH New Markus Lehtonen 1 participant 1 message May 26, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 cookerdata: print an error if layer dir does not exist

Makes it easier for user to identify problems, e.g. typos, in BBLAYERS.

[YOCTO #9507]

---
 lib/bb/cookerdata.py | 4 ++++
 1 file changed, 4 insertions(+)
lib/bb/cookerdata.py +4 -0
index 1615db5..dc34efe 100644
@@ -292,6 +292,10 @@ class CookerDataBuilder(object):
             data = bb.data.createCopy(data)
             approved = bb.utils.approved_variables()
             for layer in layers:
+                if not os.path.isdir(layer):
+                    parselog.critical("Layer directory '%s' does not exist! "
+                                      "Please check BBLAYERS in %s" % (layer, layerconf))
+                    sys.exit(1)
                 parselog.debug(2, "Adding layer %s", layer)
                 if 'HOME' in approved and '~' in layer:
                     layer = os.path.expanduser(layer)
Signature · 1 line
2.6.6