summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-03-16 13:57:33 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-03-18 13:17:10 +0000
commitb58049b4e70f896ec60f3f35c28e55b15db3039c (patch)
tree2752c4dd10a970d1d06ab0bf77cdf68c381af82e /bitbake
parentc45c8308006833e80ffa7fa84e647cea44148de0 (diff)
downloadpoky-b58049b4e70f896ec60f3f35c28e55b15db3039c.tar.gz
bitbake: data_smart: Avoid multiple getVarFlag calls
We can call getVarFlags() instead of the multiple getVarFlag calls which is a little more efficient. This reduces the number of overall function calls so is good but probably isn't much faster (or slower). (Bitbake rev: 505a4dd34e822bdf902d9b348dbcdf5b2c94e784) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/data_smart.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py
index ca78d84133..dd20ca557e 100644
--- a/bitbake/lib/bb/data_smart.py
+++ b/bitbake/lib/bb/data_smart.py
@@ -673,10 +673,11 @@ class DataSmart(MutableMapping):
673 self.varhistory.record(**loginfo) 673 self.varhistory.record(**loginfo)
674 self.setVar(newkey, val, ignore=True, parsing=True) 674 self.setVar(newkey, val, ignore=True, parsing=True)
675 675
676 for i in (__setvar_keyword__): 676 srcflags = self.getVarFlags(key, False, True) or {}
677 src = self.getVarFlag(key, i, False) 677 for i in srcflags:
678 if src is None: 678 if i not in (__setvar_keyword__):
679 continue 679 continue
680 src = srcflags[i]
680 681
681 dest = self.getVarFlag(newkey, i, False) or [] 682 dest = self.getVarFlag(newkey, i, False) or []
682 dest.extend(src) 683 dest.extend(src)