diff options
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r-- | bitbake/lib/bb/cooker.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index e30fde0743..23388d8c97 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
@@ -430,8 +430,32 @@ class BBCooker: | |||
430 | if not regex in matched: | 430 | if not regex in matched: |
431 | collectlog.warn("No bb files matched BBFILE_PATTERN_%s '%s'" % (collection, pattern)) | 431 | collectlog.warn("No bb files matched BBFILE_PATTERN_%s '%s'" % (collection, pattern)) |
432 | 432 | ||
433 | def findConfigFiles(self, varname): | ||
434 | """ | ||
435 | Find config files which are appropriate values for varname. | ||
436 | i.e. MACHINE, DISTRO | ||
437 | """ | ||
438 | possible = [] | ||
439 | var = varname.lower() | ||
440 | |||
441 | data = self.configuration.data | ||
442 | # iterate configs | ||
443 | bbpaths = bb.data.getVar('BBPATH', data, True).split(':') | ||
444 | for path in bbpaths: | ||
445 | confpath = os.path.join(path, "conf", var) | ||
446 | if os.path.exists(confpath): | ||
447 | for root, dirs, files in os.walk(confpath): | ||
448 | # get all child files, these are appropriate values | ||
449 | for f in files: | ||
450 | val, sep, end = f.rpartition('.') | ||
451 | if end == 'conf': | ||
452 | possible.append(val) | ||
453 | |||
454 | bb.event.fire(bb.event.ConfigFilesFound(var, possible), self.configuration.data) | ||
455 | |||
433 | def checkInheritsClass(self, klass): | 456 | def checkInheritsClass(self, klass): |
434 | pkg_list = [] | 457 | pkg_list = [] |
458 | |||
435 | for pfn in self.status.pkg_fn: | 459 | for pfn in self.status.pkg_fn: |
436 | inherits = self.status.inherits.get(pfn, None) | 460 | inherits = self.status.inherits.get(pfn, None) |
437 | if inherits and inherits.count(klass) > 0: | 461 | if inherits and inherits.count(klass) > 0: |