summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-20 11:28:04 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-16 12:49:06 +0000
commitc8daf507295b76c0ea080e043a6e7a26dcdd83e4 (patch)
tree6f1ebe6fb2a3ceb299ff3abeb55c2e1208945e69 /bitbake
parent6c08cf277a8a804a69ca9e173d0eeb51f0eb09bc (diff)
downloadpoky-c8daf507295b76c0ea080e043a6e7a26dcdd83e4.tar.gz
bitbake: data_smart: Fix unneeded variable manipulation
If was pointed out that if we have: XXX = " A" XXX_remove_inactive-override = "YY" then XXX can become "A" and the leading space can be removed. This is because the remove override code changes the variable value even when there is no removals active. In the process it dirties the cache. We don't really need to do this so tweak the code accordingly. (Bitbake rev: f1ee6dfd3d193a9055320bdd555c1dbaa63f9475) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/data_smart.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py
index f100446dcc..805a9a71fa 100644
--- a/bitbake/lib/bb/data_smart.py
+++ b/bitbake/lib/bb/data_smart.py
@@ -748,13 +748,14 @@ class DataSmart(MutableMapping):
748 if match: 748 if match:
749 removes.extend(self.expand(r).split()) 749 removes.extend(self.expand(r).split())
750 750
751 filtered = filter(lambda v: v not in removes, 751 if removes:
752 value.split()) 752 filtered = filter(lambda v: v not in removes,
753 value = " ".join(filtered) 753 value.split())
754 if expand and var in self.expand_cache: 754 value = " ".join(filtered)
755 # We need to ensure the expand cache has the correct value 755 if expand and var in self.expand_cache:
756 # flag == "_content" here 756 # We need to ensure the expand cache has the correct value
757 self.expand_cache[var].value = value 757 # flag == "_content" here
758 self.expand_cache[var].value = value
758 return value 759 return value
759 760
760 def delVarFlag(self, var, flag, **loginfo): 761 def delVarFlag(self, var, flag, **loginfo):