summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/command.py10
-rw-r--r--bitbake/lib/bb/cooker.py4
-rw-r--r--bitbake/lib/bb/event.py8
3 files changed, 22 insertions, 0 deletions
diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py
index d597d1d39b..2f37938cee 100644
--- a/bitbake/lib/bb/command.py
+++ b/bitbake/lib/bb/command.py
@@ -251,6 +251,16 @@ class CommandsAsync:
251 command.finishAsyncCommand() 251 command.finishAsyncCommand()
252 findConfigFiles.needcache = True 252 findConfigFiles.needcache = True
253 253
254 def findConfigFilePath(self, command, params):
255 """
256 Find the path of the requested configuration file
257 """
258 configfile = params[0]
259
260 command.cooker.findConfigFilePath(configfile)
261 command.finishAsyncCommand()
262 findConfigFilePath.needcache = False
263
254 def showVersions(self, command, params): 264 def showVersions(self, command, params):
255 """ 265 """
256 Show the currently selected versions 266 Show the currently selected versions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 369444b9b3..e537634df8 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -516,6 +516,10 @@ class BBCooker:
516 if regex in unmatched: 516 if regex in unmatched:
517 collectlog.warn("No bb files matched BBFILE_PATTERN_%s '%s'" % (collection, pattern)) 517 collectlog.warn("No bb files matched BBFILE_PATTERN_%s '%s'" % (collection, pattern))
518 518
519 def findConfigFilePath(self, configfile):
520 path = self._findConfigFile(configfile)
521 bb.event.fire(bb.event.ConfigFilePathFound(path), self.configuration.data)
522
519 def findConfigFiles(self, varname): 523 def findConfigFiles(self, varname):
520 """ 524 """
521 Find config files which are appropriate values for varname. 525 Find config files which are appropriate values for varname.
diff --git a/bitbake/lib/bb/event.py b/bitbake/lib/bb/event.py
index 7d47edb9e7..7c49d464dd 100644
--- a/bitbake/lib/bb/event.py
+++ b/bitbake/lib/bb/event.py
@@ -399,6 +399,14 @@ class ConfigFilesFound(Event):
399 self._variable = variable 399 self._variable = variable
400 self._values = values 400 self._values = values
401 401
402class ConfigFilePathFound(Event):
403 """
404 Event when a path for a config file has been found
405 """
406 def __init__(self, path):
407 Event.__init__(self)
408 self._path = path
409
402class MsgBase(Event): 410class MsgBase(Event):
403 """Base class for messages""" 411 """Base class for messages"""
404 412