summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorTalel BELHAJ SALEM <bhstalel@gmail.com>2025-10-09 18:53:00 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-11-07 13:15:35 +0000
commit5c27e317f820fd62f854033555036cccd27a8061 (patch)
tree2cf4f9fe8383d5225a588e7c51beb416ccc5ccc8 /bitbake
parent711b86f6fae4fd205357738bdf374ada164c9f57 (diff)
downloadpoky-5c27e317f820fd62f854033555036cccd27a8061.tar.gz
bitbake: lib/bb/data_smart: add removeFromVar method
Tested with: MY_VARIABLE = "foo hello foo world" python () { d.removeFromVar('MY_VARIABLE', 'foo') } $ bitbake-getvar -r example --value MY_VARIABLE hello world (Bitbake rev: daf1ea2c066e05fa0a64e5af4a5f968efff4f976) Signed-off-by: Talel BELHAJ SALEM <bhstalel@gmail.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/data_smart.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py
index 2e0d308588..554255f3d3 100644
--- a/bitbake/lib/bb/data_smart.py
+++ b/bitbake/lib/bb/data_smart.py
@@ -714,6 +714,11 @@ class DataSmart(MutableMapping):
714 self.varhistory.record(**loginfo) 714 self.varhistory.record(**loginfo)
715 self.setVar(var + ":prepend", value, ignore=True, parsing=True) 715 self.setVar(var + ":prepend", value, ignore=True, parsing=True)
716 716
717 def removeFromVar(self, var, value, **loginfo):
718 loginfo['op'] = 'remove'
719 self.varhistory.record(**loginfo)
720 self.setVar(var + ":remove", value, ignore=True, parsing=True)
721
717 def delVar(self, var, **loginfo): 722 def delVar(self, var, **loginfo):
718 self.expand_cache = {} 723 self.expand_cache = {}
719 724