Skip to contentSkip to conversation

bitbake: cooker: Resolve file monitoring race issues when using memres bitbake

PATCH New Richard Purdie 1 participant 1 message Aug 3, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bitbake: cooker: Resolve file monitoring race issues when using memres bitbake

If you load memory resident bitbake, then change bblayers.conf or other configuration files, then execute your first command, bitbake will not notice the changes. This is because it adds the file watches during inital parsing, which happens at the time the first command is run.

To fix this, we move the addition of the file watches to earlier in the process, so bitbake then does track them correctly. This also avoids some issues Paul was seeing with tinfoil2.

(Bitbake rev: b9375c73e736003e66575969c9ea244403e47aeb)

bitbake/lib/bb/cooker.py +4 -3
index 52b81be..0f99342 100644
@@ -349,6 +349,10 @@ class BBCooker:
         if CookerFeatures.BASEDATASTORE_TRACKING in self.featureset:
             self.disableDataTracking()
 
+        self.data.renameVar("__depends", "__base_depends")
+        self.add_filewatch(self.data.getVar("__base_depends", False), self.configwatcher)
+
+
     def enableDataTracking(self):
         self.configuration.tracking = True
         if hasattr(self, "data"):
@@ -1464,9 +1468,6 @@ class BBCooker:
             self.collection = CookerCollectFiles(self.recipecache.bbfile_config_priorities)
             (filelist, masked) = self.collection.collect_bbfiles(self.data, self.expanded_data)
 
-            self.data.renameVar("__depends", "__base_depends")
-            self.add_filewatch(self.data.getVar("__base_depends", False), self.configwatcher)
-
             self.parser = CookerParser(self, filelist, masked)
             self.parsecache_valid = True