summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/data_smart.py
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-01-22 09:05:39 +0000
commit45df694a9f472ac2f684aadac4d864c3dfdc48a7 (patch)
tree52e872c9edb22c42e373d4622158fccae0f7f4a6 /bitbake/lib/bb/data_smart.py
parent0ccdfb116e41dcd1d86a259e7c993fc354fbc4e5 (diff)
downloadpoky-45df694a9f472ac2f684aadac4d864c3dfdc48a7.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: 2bc4d35fb32defc59cd6ed1fc87e35924c201a5c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/data_smart.py')
-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 79d591a237..0cd41683d9 100644
--- a/bitbake/lib/bb/data_smart.py
+++ b/bitbake/lib/bb/data_smart.py
@@ -784,13 +784,14 @@ class DataSmart(MutableMapping):
784 if match: 784 if match:
785 removes.extend(self.expand(r).split()) 785 removes.extend(self.expand(r).split())
786 786
787 filtered = filter(lambda v: v not in removes, 787 if removes:
788 value.split()) 788 filtered = filter(lambda v: v not in removes,
789 value = " ".join(filtered) 789 value.split())
790 if expand and var in self.expand_cache: 790 value = " ".join(filtered)
791 # We need to ensure the expand cache has the correct value 791 if expand and var in self.expand_cache:
792 # flag == "_content" here 792 # We need to ensure the expand cache has the correct value
793 self.expand_cache[var].value = value 793 # flag == "_content" here
794 self.expand_cache[var].value = value
794 return value 795 return value
795 796
796 def delVarFlag(self, var, flag, **loginfo): 797 def delVarFlag(self, var, flag, **loginfo):