summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-30 13:38:42 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-31 23:30:03 +0100
commit92903ced3ac318c6a7e7e43bcdd1895d3c7b83d1 (patch)
treedb204ea627410e2525f21f1e8d93b100f35429c8
parent24a938cea199f744a4e5ed34b887f10726ae3cb9 (diff)
downloadpoky-92903ced3ac318c6a7e7e43bcdd1895d3c7b83d1.tar.gz
bitbake: 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. (Bitbake rev: af3c8928a69f204d5ced02c947485990ac04a776) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/command.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/bitbake/lib/bb/command.py b/bitbake/lib/bb/command.py
index a9232455cc..0d0354c30f 100644
--- a/bitbake/lib/bb/command.py
+++ b/bitbake/lib/bb/command.py
@@ -79,7 +79,7 @@ class Command:
79 return None, "Not able to execute not readonly commands in readonly mode" 79 return None, "Not able to execute not readonly commands in readonly mode"
80 try: 80 try:
81 self.cooker.process_inotify_updates() 81 self.cooker.process_inotify_updates()
82 if getattr(command_method, 'needconfig', False): 82 if getattr(command_method, 'needconfig', True):
83 self.cooker.updateCacheSync() 83 self.cooker.updateCacheSync()
84 result = command_method(self, commandline) 84 result = command_method(self, commandline)
85 except CommandError as exc: 85 except CommandError as exc:
@@ -283,6 +283,7 @@ class CommandsSync:
283 parseConfiguration.needconfig = False 283 parseConfiguration.needconfig = False
284 284
285 def getLayerPriorities(self, command, params): 285 def getLayerPriorities(self, command, params):
286 command.cooker.parseConfiguration()
286 ret = [] 287 ret = []
287 # regex objects cannot be marshalled by xmlrpc 288 # regex objects cannot be marshalled by xmlrpc
288 for collection, pattern, regex, pri in command.cooker.bbfile_config_priorities: 289 for collection, pattern, regex, pri in command.cooker.bbfile_config_priorities: