* [PATCH 0/1] Only return parsed configuration files @ 2011-08-09 16:23 Joshua Lock 2011-08-09 16:23 ` [PATCH 1/1] bb/cooker: only emit ConfigFilePathFound for files which were parsed Joshua Lock 0 siblings, 1 reply; 3+ messages in thread From: Joshua Lock @ 2011-08-09 16:23 UTC (permalink / raw) To: bitbake-devel This is an updated change to findConfigFilePath which includes review feedback. The following changes since commit c3827690b9ba3625d1df32d9517efbe13d7d9a1e: bb/ui/hob: Restore toolchain relevant preference settings for build (2011-08-09 15:19:51 +0100) are available in the git repository at: git://github.com/incandescant/bitbake hob https://github.com/incandescant/bitbake/tree/hob Joshua Lock (1): bb/cooker: only emit ConfigFilePathFound for files which were parsed lib/bb/cooker.py | 28 ++++++++++++++++++++++++++-- 1 files changed, 26 insertions(+), 2 deletions(-) -- 1.7.6 ^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/1] bb/cooker: only emit ConfigFilePathFound for files which were parsed 2011-08-09 16:23 [PATCH 0/1] Only return parsed configuration files Joshua Lock @ 2011-08-09 16:23 ` Joshua Lock 2011-08-10 12:38 ` Richard Purdie 0 siblings, 1 reply; 3+ messages in thread From: Joshua Lock @ 2011-08-09 16:23 UTC (permalink / raw) To: bitbake-devel When the requested configuration file is found on disk check the against the configuration files in __depends/__base_depends to ensure the file was parsed before emitting the ConfigFilePathFound event. If the requested file wasn't parsed just return (and don't emit). Fixes [YOCTO #1246] Signed-off-by: Joshua Lock <josh@linux.intel.com> --- lib/bb/cooker.py | 28 ++++++++++++++++++++++++++-- 1 files changed, 26 insertions(+), 2 deletions(-) diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py index 6022192..a8edfe7 100644 --- a/lib/bb/cooker.py +++ b/lib/bb/cooker.py @@ -609,9 +609,33 @@ class BBCooker: collectlog.warn("No bb files matched BBFILE_PATTERN_%s '%s'" % (collection, pattern)) def findConfigFilePath(self, configfile): + """ + Find the location on disk of configfile and if it exists and was parsed by BitBake + emit the ConfigFilePathFound event with the path to the file. + """ path = self._findConfigFile(configfile) - if path: - bb.event.fire(bb.event.ConfigFilePathFound(path), self.configuration.data) + if not path: + return + + # Generate a list of parsed configuration files by searching the files + # listed in the __depends and __base_depends variables with a .conf suffix. + conffiles = [] + dep_files = bb.data.getVar('__depends', self.configuration.data) or set() + dep_files.union(bb.data.getVar('__base_depends', self.configuration.data) or set()) + + for f in dep_files: + if f[0].endswith(".conf"): + conffiles.append(f[0]) + + _, conf, conffile = path.rpartition("conf/") + match = os.path.join(conf, conffile) + # Try and find matches for conf/conffilename.conf as we don't always + # have the full path to the file. + for cfg in conffiles: + if cfg.endswith(match): + bb.event.fire(bb.event.ConfigFilePathFound(path), + self.configuration.data) + break def findFilesMatchingInDir(self, filepattern, directory): """ -- 1.7.6 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] bb/cooker: only emit ConfigFilePathFound for files which were parsed 2011-08-09 16:23 ` [PATCH 1/1] bb/cooker: only emit ConfigFilePathFound for files which were parsed Joshua Lock @ 2011-08-10 12:38 ` Richard Purdie 0 siblings, 0 replies; 3+ messages in thread From: Richard Purdie @ 2011-08-10 12:38 UTC (permalink / raw) To: Joshua Lock; +Cc: bitbake-devel On Tue, 2011-08-09 at 09:23 -0700, Joshua Lock wrote: > When the requested configuration file is found on disk check the > against the configuration files in __depends/__base_depends to ensure the > file was parsed before emitting the ConfigFilePathFound event. > If the requested file wasn't parsed just return (and don't emit). > > Fixes [YOCTO #1246] > > Signed-off-by: Joshua Lock <josh@linux.intel.com> > --- > lib/bb/cooker.py | 28 ++++++++++++++++++++++++++-- > 1 files changed, 26 insertions(+), 2 deletions(-) Merged to master, thanks. Richard ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-08-10 12:43 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-08-09 16:23 [PATCH 0/1] Only return parsed configuration files Joshua Lock 2011-08-09 16:23 ` [PATCH 1/1] bb/cooker: only emit ConfigFilePathFound for files which were parsed Joshua Lock 2011-08-10 12:38 ` Richard Purdie
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox