summaryrefslogtreecommitdiff
path: root/kconfiglib.py
diff options
context:
space:
mode:
Diffstat (limited to 'kconfiglib.py')
-rw-r--r--kconfiglib.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/kconfiglib.py b/kconfiglib.py
index f31a71c..05cc172 100644
--- a/kconfiglib.py
+++ b/kconfiglib.py
@@ -2474,6 +2474,10 @@ class Symbol(object):
val = val_expr.str_value
break
+ # Corresponds to SYMBOL_AUTO in the C implementation
+ if self.env_var is not None:
+ self._write_to_conf = False
+
self._cached_str_val = val
return val
@@ -2572,10 +2576,6 @@ class Symbol(object):
"""
See the class documentation.
"""
- if self.env_var is not None:
- # Corresponds to SYMBOL_AUTO being set in the C implementation
- return None
-
# Note: _write_to_conf is determined when the value is calculated. This
# is a hidden function call due to property magic.
val = self.str_value
@@ -2666,6 +2666,12 @@ class Symbol(object):
return False
+ if self.env_var is not None:
+ self.kconfig._warn("ignored attempt to assign user value to "
+ "{}, which gets its value from the environment"
+ .format(self.name))
+ return False
+
if self.choice and value == 2:
# Remember this as a choice selection only. Makes switching back
# and forth between choice modes work as expected, and makes the