summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cooker.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r--bitbake/lib/bb/cooker.py28
1 files changed, 26 insertions, 2 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 4c13d32b47..46b42e6a69 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -615,9 +615,33 @@ class BBCooker:
615 collectlog.warn("No bb files matched BBFILE_PATTERN_%s '%s'" % (collection, pattern)) 615 collectlog.warn("No bb files matched BBFILE_PATTERN_%s '%s'" % (collection, pattern))
616 616
617 def findConfigFilePath(self, configfile): 617 def findConfigFilePath(self, configfile):
618 """
619 Find the location on disk of configfile and if it exists and was parsed by BitBake
620 emit the ConfigFilePathFound event with the path to the file.
621 """
618 path = self._findConfigFile(configfile) 622 path = self._findConfigFile(configfile)
619 if path: 623 if not path:
620 bb.event.fire(bb.event.ConfigFilePathFound(path), self.configuration.data) 624 return
625
626 # Generate a list of parsed configuration files by searching the files
627 # listed in the __depends and __base_depends variables with a .conf suffix.
628 conffiles = []
629 dep_files = bb.data.getVar('__depends', self.configuration.data) or set()
630 dep_files.union(bb.data.getVar('__base_depends', self.configuration.data) or set())
631
632 for f in dep_files:
633 if f[0].endswith(".conf"):
634 conffiles.append(f[0])
635
636 _, conf, conffile = path.rpartition("conf/")
637 match = os.path.join(conf, conffile)
638 # Try and find matches for conf/conffilename.conf as we don't always
639 # have the full path to the file.
640 for cfg in conffiles:
641 if cfg.endswith(match):
642 bb.event.fire(bb.event.ConfigFilePathFound(path),
643 self.configuration.data)
644 break
621 645
622 def findFilesMatchingInDir(self, filepattern, directory): 646 def findFilesMatchingInDir(self, filepattern, directory):
623 """ 647 """