Skip to contentSkip to conversation

bb/ui: Use getSetVariable command for BB_CONSOLELOG

PATCH New Richard Purdie 1 participant 1 message Oct 11, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bb/ui: Use getSetVariable command for BB_CONSOLELOG

Metadata can define BB_CONSOLELOG as containing ${DATETIME} and this can get expanded to a different value each time the variable is read. In the case of BB_CONSOLELOG, this behaviour is not desireable.

The values of DATE/TIME are locked down at build time but this is too late for the purposes of ensuring the system can figure out the real value of BB_CONSOLELOG.

The best way to do this is to set the variable into the datastore, thereby preserving its value.

[YOCTO #8411]

---
 bitbake/lib/bb/ui/knotty.py    | 2 +-
 bitbake/lib/bb/ui/toasterui.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
bitbake/lib/bb/ui/knotty.py +1 -1
index b96249a..1ecf1aa 100644
@@ -246,7 +246,7 @@ def _log_settings_from_server(server):
     if error:
         logger.error("Unable to get the value of BBINCLUDELOGS_LINES variable: %s" % error)
         raise BaseException(error)
-    consolelogfile, error = server.runCommand(["getVariable", "BB_CONSOLELOG"])
+    consolelogfile, error = server.runCommand(["getSetVariable", "BB_CONSOLELOG"])
     if error:
         logger.error("Unable to get the value of BB_CONSOLELOG variable: %s" % error)
         raise BaseException(error)
bitbake/lib/bb/ui/toasterui.py +1 -1
index f30f89e..8d4cad6 100644
@@ -58,7 +58,7 @@ def _log_settings_from_server(server):
     if error:
         logger.error("Unable to get the value of BBINCLUDELOGS_LINES variable: %s" % error)
         raise BaseException(error)
-    consolelogfile, error = server.runCommand(["getVariable", "BB_CONSOLELOG"])
+    consolelogfile, error = server.runCommand(["getSetVariable", "BB_CONSOLELOG"])
     if error:
         logger.error("Unable to get the value of BB_CONSOLELOG variable: %s" % error)
         raise BaseException(error)