Skip to contentSkip to conversation

command: Fix some bugs identified by BB_SERVER_TIMEOUT

PATCH New Richard Purdie 1 participant 1 message Aug 30, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 command: Fix some bugs identified by BB_SERVER_TIMEOUT

The 'needconfig' flag was meant to be the default as most commands do need it and the "False" cases were the exception. The code was written backwards with a default False value. Invert this to match the intent, resulting in the config being reparsed if metadata has changed.

Also ensure the second level configuration is parsed for the getLayerPriorities command as otherwise it can return stale info.

With these changes:

BB_SERVER_TIMEOUT=100 oe-selftest -r bblayers.BitbakeLayers.test_bitbakelayers_add_remove

passes instead of fails.

---
 lib/bb/command.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
lib/bb/command.py +2 -1
index a923245..0d0354c 100644
@@ -79,7 +79,7 @@ class Command:
                     return None, "Not able to execute not readonly commands in readonly mode"
             try:
                 self.cooker.process_inotify_updates()
-                if getattr(command_method, 'needconfig', False):
+                if getattr(command_method, 'needconfig', True):
                     self.cooker.updateCacheSync()
                 result = command_method(self, commandline)
             except CommandError as exc:
@@ -283,6 +283,7 @@ class CommandsSync:
     parseConfiguration.needconfig = False
 
     def getLayerPriorities(self, command, params):
+        command.cooker.parseConfiguration()
         ret = []
         # regex objects cannot be marshalled by xmlrpc
         for collection, pattern, regex, pri in command.cooker.bbfile_config_priorities:
Signature · 1 line
2.7.4