Procházet zdrojové kódy

cooker: Ensure cooker's enviroment is updated on updateConfig

Only the env variables which were added to the datastore were being
updated. We need to update the whole copy, we just only trigger a
reparse if any of the variables making it into the datastore change.

This avoids a bug where variables such as DISPLAY in a new UI context
would break under memory resident bitbake.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie před 3 roky
rodič
revize
4bb71b6277
1 změnil soubory, kde provedl 4 přidání a 0 odebrání
  1. 4 0
      lib/bb/cooker.py

+ 4 - 0
lib/bb/cooker.py

@@ -479,6 +479,10 @@ class BBCooker:
                 logger.debug(1, "Updating environment variable %s from %s to %s" % (k, self.configuration.env[k], environment[k]))
                 self.configuration.env[k] = environment[k]
                 clean = False
+
+        # Now update all the variables not in the datastore to match
+        self.configuration.env = environment
+
         if not clean:
             logger.debug(1, "Base environment change, triggering reparse")
             self.reset()