* [PATCH] bitbake & hob: reparse config files, when sanity check updates bblayers.conf
@ 2013-02-12 10:11 Cristiana Voicu
2013-02-12 13:07 ` Richard Purdie
0 siblings, 1 reply; 2+ messages in thread
From: Cristiana Voicu @ 2013-02-12 10:11 UTC (permalink / raw)
To: bitbake-devel
I've sent a patch to poky, with some changes in sanity.bbclass. When bblayers.conf
is updated, it updates also a variable to know when to reparse configuration files.
This patch contains the changes to reparse conf files, after a sanity check which
changes bblayers.conf.
[YOCTO #3213]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
---
bitbake/lib/bb/cooker.py | 14 ++++++++++----
bitbake/lib/bb/ui/crumbs/hobeventhandler.py | 4 ++++
2 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index f70a04f..d31b93c 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -977,10 +977,16 @@ class BBCooker:
bb.fetch.fetcher_init(data)
bb.codeparser.parser_cache_init(data)
bb.event.fire(bb.event.ConfigParsed(), data)
- bb.parse.init_parser(data)
- data.setVar('BBINCLUDED',bb.parse.get_file_depends(data))
- self.configuration.data = data
- self.configuration.data_hash = data.get_hash()
+
+ if data.getVar("REPARSE_NEEDED") is True:
+ data.setVar("REPARSE_NEEDED", False)
+ self.parseConfigurationFiles(self.configuration.prefile,
+ self.configuration.postfile)
+ else:
+ bb.parse.init_parser(data)
+ data.setVar('BBINCLUDED',bb.parse.get_file_depends(data))
+ self.configuration.data = data
+ self.configuration.data_hash = data.get_hash()
def handleCollections( self, collections ):
"""Handle collections"""
diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
index d953f34..637375f 100644
--- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
+++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
@@ -202,6 +202,10 @@ class HobHandler(gobject.GObject):
self.run_next_command()
elif isinstance(event, bb.event.SanityCheckPassed):
+ reparse = self.runCommand(["getVariable", "REPARSE_NEEDED"]) or None
+ if reparse is True:
+ self.runCommand(["setVariable", "REPARSE_NEEDED", False])
+ self.runCommand(["parseConfigurationFiles", "", ""])
self.run_next_command()
elif isinstance(event, bb.event.SanityCheckFailed):
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] bitbake & hob: reparse config files, when sanity check updates bblayers.conf
2013-02-12 10:11 [PATCH] bitbake & hob: reparse config files, when sanity check updates bblayers.conf Cristiana Voicu
@ 2013-02-12 13:07 ` Richard Purdie
0 siblings, 0 replies; 2+ messages in thread
From: Richard Purdie @ 2013-02-12 13:07 UTC (permalink / raw)
To: Cristiana Voicu; +Cc: bitbake-devel
On Tue, 2013-02-12 at 12:11 +0200, Cristiana Voicu wrote:
> I've sent a patch to poky, with some changes in sanity.bbclass. When bblayers.conf
> is updated, it updates also a variable to know when to reparse configuration files.
> This patch contains the changes to reparse conf files, after a sanity check which
> changes bblayers.conf.
>
> [YOCTO #3213]
> Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
> ---
> bitbake/lib/bb/cooker.py | 14 ++++++++++----
> bitbake/lib/bb/ui/crumbs/hobeventhandler.py | 4 ++++
> 2 files changed, 14 insertions(+), 4 deletions(-)
Can we rename this variable please, its not well namespaced.
BB_INVALIDCONF would probably be a better name to indicate what the
problem is, not the solution and the BB prefix indicates its something
BitBake is expected to act upon.
Cheers,
Richard
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-02-12 13:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-12 10:11 [PATCH] bitbake & hob: reparse config files, when sanity check updates bblayers.conf Cristiana Voicu
2013-02-12 13:07 ` Richard Purdie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.