diff options
Diffstat (limited to 'scripts/lib')
-rw-r--r-- | scripts/lib/checklayer/__init__.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/lib/checklayer/__init__.py b/scripts/lib/checklayer/__init__.py index f625d59896..fe545607bb 100644 --- a/scripts/lib/checklayer/__init__.py +++ b/scripts/lib/checklayer/__init__.py | |||
@@ -229,6 +229,20 @@ def add_layers(bblayersconf, layers, logger): | |||
229 | f.write("\nBBLAYERS += \"%s\"\n" % path) | 229 | f.write("\nBBLAYERS += \"%s\"\n" % path) |
230 | return True | 230 | return True |
231 | 231 | ||
232 | def check_bblayers(bblayersconf, layer_path, logger): | ||
233 | ''' | ||
234 | If layer_path found in BBLAYERS return True | ||
235 | ''' | ||
236 | import bb.parse | ||
237 | import bb.data | ||
238 | |||
239 | ldata = bb.parse.handle(bblayersconf, bb.data.init(), include=True) | ||
240 | for bblayer in (ldata.getVar('BBLAYERS') or '').split(): | ||
241 | if os.path.normpath(bblayer) == os.path.normpath(layer_path): | ||
242 | return True | ||
243 | |||
244 | return False | ||
245 | |||
232 | def check_command(error_msg, cmd, cwd=None): | 246 | def check_command(error_msg, cmd, cwd=None): |
233 | ''' | 247 | ''' |
234 | Run a command under a shell, capture stdout and stderr in a single stream, | 248 | Run a command under a shell, capture stdout and stderr in a single stream, |