diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2015-09-22 16:09:05 +0300 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2015-09-22 16:09:05 +0300 |
commit | 3445365503e1e4d5601acf7c05609cc9673ec414 (patch) | |
tree | 7eb70c5bab200b0515a1b4d16873a75855df4c89 /yocto-poky/bitbake/lib/bb/data_smart.py | |
parent | d10502479a70bd72ca4e09569b6ee738875e4823 (diff) | |
parent | d7e963193b4e6541206a320316a158a65f1fee89 (diff) | |
download | openbmc-3445365503e1e4d5601acf7c05609cc9673ec414.tar.xz |
Merge commit 'd7e963193b4e6541206a320316a158a65f1fee89' into HEAD
Diffstat (limited to 'yocto-poky/bitbake/lib/bb/data_smart.py')
-rw-r--r-- | yocto-poky/bitbake/lib/bb/data_smart.py | 38 |
1 files changed, 30 insertions, 8 deletions
diff --git a/yocto-poky/bitbake/lib/bb/data_smart.py b/yocto-poky/bitbake/lib/bb/data_smart.py index 79b4ed932..70558c15a 100644 --- a/yocto-poky/bitbake/lib/bb/data_smart.py +++ b/yocto-poky/bitbake/lib/bb/data_smart.py @@ -413,9 +413,11 @@ class DataSmart(MutableMapping): self.overrides = None def need_overrides(self): - if self.overrides is None: - if self.inoverride: - return + if self.overrides is not None: + return + if self.inoverride: + return + for count in range(5): self.inoverride = True # Can end up here recursively so setup dummy values self.overrides = [] @@ -424,6 +426,13 @@ class DataSmart(MutableMapping): self.overridesset = set(self.overrides) self.inoverride = False self.expand_cache = {} + newoverrides = (self.getVar("OVERRIDES", True) or "").split(":") or [] + if newoverrides == self.overrides: + break + self.overrides = newoverrides + self.overridesset = set(self.overrides) + else: + bb.fatal("Overrides could not be expanded into a stable state after 5 iterations, overrides must be being referenced by other overridden variables in some recursive fashion. Please provide your configuration to bitbake-devel so we can laugh, er, I mean try and understand how to make it work.") def initVar(self, var): self.expand_cache = {} @@ -484,10 +493,8 @@ class DataSmart(MutableMapping): if '_' in var: self._setvar_update_overrides(base, **loginfo) - if base in self.overridevars: - self.overridevars.update(self.expandWithRefs(value, var).references) - self.internal_finalize(True) + self._setvar_update_overridevars(var, value) return if not var in self.dict: @@ -520,8 +527,21 @@ class DataSmart(MutableMapping): self.varhistory.record(**loginfo) if var in self.overridevars: - self.overridevars.update(self.expandWithRefs(value, var).references) - self.internal_finalize(True) + self._setvar_update_overridevars(var, value) + + def _setvar_update_overridevars(self, var, value): + vardata = self.expandWithRefs(value, var) + new = vardata.references + new.update(vardata.contains.keys()) + while not new.issubset(self.overridevars): + nextnew = set() + self.overridevars.update(new) + for i in new: + vardata = self.expandWithRefs(self.getVar(i, True), i) + nextnew.update(vardata.references) + nextnew.update(vardata.contains.keys()) + new = nextnew + self.internal_finalize(True) def _setvar_update_overrides(self, var, **loginfo): # aka pay the cookie monster @@ -628,6 +648,8 @@ class DataSmart(MutableMapping): if flag == "_defaultval" and '_' in var: self._setvar_update_overrides(var, **loginfo) + if flag == "_defaultval" and var in self.overridevars: + self._setvar_update_overridevars(var, value) if flag == "unexport" or flag == "export": if not "__exportlist" in self.dict: |