diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-05-21 10:41:27 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-07-12 22:50:45 +0100 |
commit | 35a6f7d21fc4a034a427e25f98da6202becfd2a7 (patch) | |
tree | f77316bf2dea2f62673cbf45f70f7d0d9cd4fac0 | |
parent | 577f16040013bc8fe9cea81cd8b40905b4fbccb7 (diff) | |
download | poky-35a6f7d21fc4a034a427e25f98da6202becfd2a7.tar.gz |
bitbake: data_smart: Fix cache clearance problems
These write operations should clear the expand cache since they can
influence returned variable values but currently do not. Fix this.
(Bitbake rev: a075332c9e13be35f1ae84adc6b29e9137a487ff)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | bitbake/lib/bb/data_smart.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py index aefc0b980b..eee5827b29 100644 --- a/bitbake/lib/bb/data_smart.py +++ b/bitbake/lib/bb/data_smart.py | |||
@@ -536,6 +536,7 @@ class DataSmart(MutableMapping): | |||
536 | self._seen_overrides[override].remove(var) | 536 | self._seen_overrides[override].remove(var) |
537 | 537 | ||
538 | def setVarFlag(self, var, flag, value, **loginfo): | 538 | def setVarFlag(self, var, flag, value, **loginfo): |
539 | self.expand_cache = {} | ||
539 | if 'op' not in loginfo: | 540 | if 'op' not in loginfo: |
540 | loginfo['op'] = "set" | 541 | loginfo['op'] = "set" |
541 | loginfo['flag'] = flag | 542 | loginfo['flag'] = flag |
@@ -624,6 +625,7 @@ class DataSmart(MutableMapping): | |||
624 | return value | 625 | return value |
625 | 626 | ||
626 | def delVarFlag(self, var, flag, **loginfo): | 627 | def delVarFlag(self, var, flag, **loginfo): |
628 | self.expand_cache = {} | ||
627 | local_var = self._findVar(var) | 629 | local_var = self._findVar(var) |
628 | if not local_var: | 630 | if not local_var: |
629 | return | 631 | return |
@@ -653,6 +655,7 @@ class DataSmart(MutableMapping): | |||
653 | self.setVarFlag(var, flag, newvalue, ignore=True) | 655 | self.setVarFlag(var, flag, newvalue, ignore=True) |
654 | 656 | ||
655 | def setVarFlags(self, var, flags, **loginfo): | 657 | def setVarFlags(self, var, flags, **loginfo): |
658 | self.expand_cache = {} | ||
656 | infer_caller_details(loginfo) | 659 | infer_caller_details(loginfo) |
657 | if not var in self.dict: | 660 | if not var in self.dict: |
658 | self._makeShadowCopy(var) | 661 | self._makeShadowCopy(var) |
@@ -682,6 +685,7 @@ class DataSmart(MutableMapping): | |||
682 | 685 | ||
683 | 686 | ||
684 | def delVarFlags(self, var, **loginfo): | 687 | def delVarFlags(self, var, **loginfo): |
688 | self.expand_cache = {} | ||
685 | if not var in self.dict: | 689 | if not var in self.dict: |
686 | self._makeShadowCopy(var) | 690 | self._makeShadowCopy(var) |
687 | 691 | ||