diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-02-15 15:06:11 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-02-17 17:51:03 +0000 |
commit | 383ade4e3ce0043f8202b1692df6ad5c9edb15cc (patch) | |
tree | 96866ed6a4f3c8fd763a2a8a9ec72def492330f3 | |
parent | 729ec0bebb81a7ce14b668a36bee1b831648bb42 (diff) | |
download | poky-383ade4e3ce0043f8202b1692df6ad5c9edb15cc.tar.gz |
bitbake: data_smart: Add hasOverrides method to public datastore API
There are some cases where the metadata needs to check if a variable
has any overrides set, even if they are currently inactive. That code
currently pokes into datastore internals. Add API instead to replace
and avoid that.
(Bitbake rev: c885e5542dcf760b8fc5881e385abb4a10020874)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | bitbake/lib/bb/data_smart.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py index 242476be0e..cb2d4b620f 100644 --- a/bitbake/lib/bb/data_smart.py +++ b/bitbake/lib/bb/data_smart.py | |||
@@ -488,6 +488,8 @@ class DataSmart(MutableMapping): | |||
488 | else: | 488 | else: |
489 | self.initVar(var) | 489 | self.initVar(var) |
490 | 490 | ||
491 | def hasOverrides(self, var): | ||
492 | return var in self.overridedata | ||
491 | 493 | ||
492 | def setVar(self, var, value, **loginfo): | 494 | def setVar(self, var, value, **loginfo): |
493 | #print("var=" + str(var) + " val=" + str(value)) | 495 | #print("var=" + str(var) + " val=" + str(value)) |