diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-02-02 23:49:09 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-02-04 23:47:49 +0000 |
commit | 4628fe12e7f2767d243949197c8326e3b7396301 (patch) | |
tree | f65671f46417a7fc5710edec657e22917c2b5f30 /bitbake/lib/bb/data_smart.py | |
parent | b98866d003eb1287909ea74d594cdd12f28466f2 (diff) | |
download | poky-4628fe12e7f2767d243949197c8326e3b7396301.tar.gz |
bitbake: lib/bb: Add expansion parameter to getVarFlag
This sets the scene for removing the default False for expansion from
getVarFlag. This would later allow True to become the expand default.
On the most part this is an automatic translation with:
sed -e 's:\(\.getVarFlag([^,()]*, [^,()]*\)):\1, False):g' -i `grep -ril getVar *`
There should be no functional change from this patch.
(Bitbake rev: 7c3b99c6a716095af3ffce0b15110e91fb49c913)
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.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py index a6611c4e94..70d314d35b 100644 --- a/bitbake/lib/bb/data_smart.py +++ b/bitbake/lib/bb/data_smart.py | |||
@@ -147,7 +147,7 @@ class DataContext(dict): | |||
147 | 147 | ||
148 | def __missing__(self, key): | 148 | def __missing__(self, key): |
149 | value = self.metadata.getVar(key, True) | 149 | value = self.metadata.getVar(key, True) |
150 | if value is None or self.metadata.getVarFlag(key, 'func'): | 150 | if value is None or self.metadata.getVarFlag(key, 'func', False): |
151 | raise KeyError(key) | 151 | raise KeyError(key) |
152 | else: | 152 | else: |
153 | return value | 153 | return value |
@@ -480,7 +480,7 @@ class DataSmart(MutableMapping): | |||
480 | base = match.group('base') | 480 | base = match.group('base') |
481 | keyword = match.group("keyword") | 481 | keyword = match.group("keyword") |
482 | override = match.group('add') | 482 | override = match.group('add') |
483 | l = self.getVarFlag(base, keyword) or [] | 483 | l = self.getVarFlag(base, keyword, False) or [] |
484 | l.append([value, override]) | 484 | l.append([value, override]) |
485 | self.setVarFlag(base, keyword, l, ignore=True) | 485 | self.setVarFlag(base, keyword, l, ignore=True) |
486 | # And cause that to be recorded: | 486 | # And cause that to be recorded: |
@@ -582,11 +582,11 @@ class DataSmart(MutableMapping): | |||
582 | self.setVar(newkey, val, ignore=True, parsing=True) | 582 | self.setVar(newkey, val, ignore=True, parsing=True) |
583 | 583 | ||
584 | for i in (__setvar_keyword__): | 584 | for i in (__setvar_keyword__): |
585 | src = self.getVarFlag(key, i) | 585 | src = self.getVarFlag(key, i, False) |
586 | if src is None: | 586 | if src is None: |
587 | continue | 587 | continue |
588 | 588 | ||
589 | dest = self.getVarFlag(newkey, i) or [] | 589 | dest = self.getVarFlag(newkey, i, False) or [] |
590 | dest.extend(src) | 590 | dest.extend(src) |
591 | self.setVarFlag(newkey, i, dest, ignore=True) | 591 | self.setVarFlag(newkey, i, dest, ignore=True) |
592 | 592 | ||