diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2012-12-11 06:48:57 +0100 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2012-12-11 06:48:57 +0100 |
| commit | 6a21927f91a36cb766ab35f6cbb008f565b2d3c9 (patch) | |
| tree | 51ae9cbbbab574d8de4758e9cb76321e82a7490d /kconfiglib.py | |
| parent | 6533806afb9bc2fd9660c3116eacdb7f20b43665 (diff) | |
Only invalidate if the user value actually changes.
Diffstat (limited to 'kconfiglib.py')
| -rw-r--r-- | kconfiglib.py | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/kconfiglib.py b/kconfiglib.py index a6ff7c5..ffae96f 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -2455,16 +2455,20 @@ class Symbol(Item, _HasVisibility): things will just work with regards to dependencies. v -- The value to give to the symbol.""" + old_user_val = self.user_val + self._set_value_no_invalidate(v, False) - # There might be something more efficient you could do here, but play - # it safe. - if self.name == "MODULES": - self.config._invalidate_all() - return + # If the user value changed, invalidate all dependent symbols + if self.user_val != old_user_val: + # There might be something more efficient you could do here, but play + # it safe. + if self.name == "MODULES": + self.config._invalidate_all() + return - self._invalidate() - self._invalidate_dependent() + self._invalidate() + self._invalidate_dependent() def reset(self): """Resets the value of the symbol, as if the symbol had never gotten a |
