diff options
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/cooker.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 1f6e093efb..8badd2d7c0 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
@@ -549,14 +549,15 @@ class BBCooker: | |||
549 | 549 | ||
550 | def findConfigFilePath(self, configfile): | 550 | def findConfigFilePath(self, configfile): |
551 | path = self._findConfigFile(configfile) | 551 | path = self._findConfigFile(configfile) |
552 | bb.event.fire(bb.event.ConfigFilePathFound(path), self.configuration.data) | 552 | if path: |
553 | bb.event.fire(bb.event.ConfigFilePathFound(path), self.configuration.data) | ||
553 | 554 | ||
554 | def findFilesMatchingInDir(self, filepattern, directory): | 555 | def findFilesMatchingInDir(self, filepattern, directory): |
555 | """ | 556 | """ |
556 | Searches for files matching the regex 'pattern' which are children of | 557 | Searches for files matching the regex 'pattern' which are children of |
557 | 'directory' in each BBPATH. i.e. to find all rootfs package classes available | 558 | 'directory' in each BBPATH. i.e. to find all rootfs package classes available |
558 | to BitBake one could call findFilesMatchingInDir(self, 'rootfs_', 'classes') | 559 | to BitBake one could call findFilesMatchingInDir(self, 'rootfs_', 'classes') |
559 | or to find all machine configuration files on could call | 560 | or to find all machine configuration files one could call: |
560 | findFilesMatchingInDir(self, 'conf/machines', 'conf') | 561 | findFilesMatchingInDir(self, 'conf/machines', 'conf') |
561 | """ | 562 | """ |
562 | import re | 563 | import re |
@@ -572,7 +573,8 @@ class BBCooker: | |||
572 | if p.search(f): | 573 | if p.search(f): |
573 | matches.append(f) | 574 | matches.append(f) |
574 | 575 | ||
575 | bb.event.fire(bb.event.FilesMatchingFound(filepattern, matches), self.configuration.data) | 576 | if matches: |
577 | bb.event.fire(bb.event.FilesMatchingFound(filepattern, matches), self.configuration.data) | ||
576 | 578 | ||
577 | def findConfigFiles(self, varname): | 579 | def findConfigFiles(self, varname): |
578 | """ | 580 | """ |
@@ -595,7 +597,8 @@ class BBCooker: | |||
595 | if end == 'conf': | 597 | if end == 'conf': |
596 | possible.append(val) | 598 | possible.append(val) |
597 | 599 | ||
598 | bb.event.fire(bb.event.ConfigFilesFound(var, possible), self.configuration.data) | 600 | if possible: |
601 | bb.event.fire(bb.event.ConfigFilesFound(var, possible), self.configuration.data) | ||
599 | 602 | ||
600 | def findInheritsClass(self, klass): | 603 | def findInheritsClass(self, klass): |
601 | """ | 604 | """ |
@@ -670,6 +673,7 @@ class BBCooker: | |||
670 | return confpath | 673 | return confpath |
671 | 674 | ||
672 | path, _ = os.path.split(path) | 675 | path, _ = os.path.split(path) |
676 | return None | ||
673 | 677 | ||
674 | def _findLayerConf(self): | 678 | def _findLayerConf(self): |
675 | return self._findConfigFile("bblayers.conf") | 679 | return self._findConfigFile("bblayers.conf") |