Skip to contentSkip to conversation

bitbake & hob: reparse config files, when sanity check updates bblayers.conf

PATCH_V2 Cristiana Voicu 1 participant 1 message Feb 12, 2013

lore
Share & tools
lore
#0 lore raw

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]
---
 bitbake/lib/bb/cooker.py                    |   14 ++++++++++----
 bitbake/lib/bb/ui/crumbs/hobeventhandler.py |    4 ++++
 2 files changed, 14 insertions(+), 4 deletions(-)
bitbake/lib/bb/cooker.py +10 -4
index f70a04f..9d051fa 100644
@@ -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("BB_INVALIDCONF") is True:
+            data.setVar("BB_INVALIDCONF", 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"""
bitbake/lib/bb/ui/crumbs/hobeventhandler.py +4 -0
index d953f34..15d28d9 100644
@@ -202,6 +202,10 @@ class HobHandler(gobject.GObject):
             self.run_next_command()
 
         elif isinstance(event, bb.event.SanityCheckPassed):
+            reparse = self.runCommand(["getVariable", "BB_INVALIDCONF"]) or None
+            if reparse is True:
+                self.runCommand(["setVariable", "BB_INVALIDCONF", False])
+                self.runCommand(["parseConfigurationFiles", "", ""])
             self.run_next_command()
 
         elif isinstance(event, bb.event.SanityCheckFailed):
Signature · 1 line
1.7.9.5