| Submitter | Otavio Salvador |
|---|---|
| Date | March 20, 2013, 5:59 p.m. |
| Message ID | <1363802396-12282-1-git-send-email-otavio@ossystems.com.br> |
| Download | mbox | patch |
| Permalink | /patch/46571/ |
| State | New |
| Headers | show |
Comments
The variable expansion needs to handle variable flags as well
otherwise those do not behave as expected. One example of this is:
,----
| ALTERNATIVE_TARGET_${PN}-foo[name] = "value"
`----
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
bitbake/lib/bb/data_smart.py | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
Patch
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py index 5bf11e5..2e43a8e 100644 --- a/lib/bb/data_smart.py +++ b/lib/bb/data_smart.py @@ -515,13 +515,17 @@ class DataSmart(MutableMapping): self.varhistory.record(**loginfo) self.setVar(newkey, val, ignore=True) - for i in ('_append', '_prepend'): + for i in (self.getVarFlags(key) or {}).keys(): src = self.getVarFlag(key, i) if src is None: continue - dest = self.getVarFlag(newkey, i) or [] - dest.extend(src) + if i in ('_append', '_prepend'): + dest = self.getVarFlag(newkey, i) or [] + else: + dest = self.getVarFlag(newkey, i) or '' + dest += src + self.setVarFlag(newkey, i, dest, ignore=True) if i in self._special_values and key in self._special_values[i]: