summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cooker.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r--bitbake/lib/bb/cooker.py22
1 files changed, 21 insertions, 1 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 95f65ac685..9086f92e5c 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -489,9 +489,29 @@ class BBCooker:
489 489
490 self.handleCollections( self.data.getVar("BBFILE_COLLECTIONS", True) ) 490 self.handleCollections( self.data.getVar("BBFILE_COLLECTIONS", True) )
491 491
492 def updateConfigOpts(self,options): 492 def updateConfigOpts(self, options, environment):
493 for o in options: 493 for o in options:
494 setattr(self.configuration, o, options[o]) 494 setattr(self.configuration, o, options[o])
495 clean = True
496 for k in bb.utils.approved_variables():
497 if k in environment and k not in self.configuration.env:
498 logger.debug(1, "Updating environment variable %s to %s" % (k, environment[k]))
499 self.configuration.env[k] = environment[k]
500 clean = False
501 if k in self.configuration.env and k not in environment:
502 logger.debug(1, "Updating environment variable %s (deleted)" % (k))
503 del self.configuration.env[k]
504 clean = False
505 if k not in self.configuration.env and k not in environment:
506 continue
507 if environment[k] != self.configuration.env[k]:
508 logger.debug(1, "Updating environment variable %s to %s" % (k, environment[k]))
509 self.configuration.env[k] = environment[k]
510 clean = False
511 if not clean:
512 logger.debug(1, "Base environment change, triggering reparse")
513 self.baseconfig_valid = False
514 self.reset()
495 515
496 def runCommands(self, server, data, abort): 516 def runCommands(self, server, data, abort):
497 """ 517 """