From 6c36f4a6aa76dbbca4f8c0623955058db34bd1e5 Mon Sep 17 00:00:00 2001 From: Joshua Lock Date: Thu, 30 Jun 2011 23:02:52 -0700 Subject: cooker|command|event: add new command findFilesMatchingInDir This command can be used to search each BBPATH for files in the passed directory which have a filename matching the supplied pattern. This is implemented for use from the GUI (to determine the available PACKAGE_CLASSES) but has been written so as to be generically useful and reusable. (Bitbake rev: 2a599812a57cb0b964880a6a2b7548423497ea92) Signed-off-by: Joshua Lock Signed-off-by: Richard Purdie --- bitbake/lib/bb/command.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'bitbake/lib/bb/command.py') diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py index 2f37938cee..a902da2ce8 100644 --- a/bitbake/lib/bb/command.py +++ b/bitbake/lib/bb/command.py @@ -251,6 +251,18 @@ class CommandsAsync: command.finishAsyncCommand() findConfigFiles.needcache = True + def findFilesMatchingInDir(self, command, params): + """ + Find implementation files matching the specified pattern + in the requested subdirectory of a BBPATH + """ + pattern = params[0] + directory = params[1] + + command.cooker.findFilesMatchingInDir(pattern, directory) + command.finishAsyncCommand() + findFilesMatchingInDir.needcache = True + def findConfigFilePath(self, command, params): """ Find the path of the requested configuration file -- cgit v1.2.3-54-g00ecf