Browse Source

cooker: Ensure BB_ORIGENV is updated by changes to configuration.env

Changes to configuration.env were not updating BB_ORIGENV, fix this.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie 3 years ago
parent
commit
c5fbd8452f
1 changed files with 6 additions and 0 deletions
  1. 6 0
      lib/bb/cooker.py

+ 6 - 0
lib/bb/cooker.py

@@ -458,6 +458,12 @@ class BBCooker:
         bb.msg.loggerDefaultLogLevel = self.configuration.default_loglevel
         bb.msg.loggerDefaultDomains = self.configuration.debug_domains
 
+        if hasattr(self, "data"):
+            origenv = bb.data.init()
+            for k in environment:
+                origenv.setVar(k, environment[k])
+            self.data.setVar("BB_ORIGENV", origenv)
+
         for k in bb.utils.approved_variables():
             if k in environment and k not in self.configuration.env:
                 logger.debug(1, "Updating new environment variable %s to %s" % (k, environment[k]))