Skip to content

Commit

Permalink
scripts: kconfig: Prefer later defaults
Browse files Browse the repository at this point in the history
This commit mirrors c6390d559f068dece53efcdadff64a40357857d7 in
Kconfiglib instead of Kconfig.

Signed-off-by: Carles Cufi <[email protected]>
  • Loading branch information
carlescufi authored and Anas Nashif committed Feb 6, 2018
1 parent 550fd87 commit 5187d4b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions kconfiglib.py
Original file line number Diff line number Diff line change
Expand Up @@ -2536,7 +2536,7 @@ def str_value(self):

else:
# No user value or invalid user value. Look at defaults.

found = False
for val_expr, cond in self.defaults:
if expr_value(cond):
self._write_to_conf = True
Expand All @@ -2547,9 +2547,9 @@ def str_value(self):
val_num = int(val, base)
else:
val_num = 0 # strtoll() on empty string

break
else:
found = True
#break
if not found:
val_num = 0 # strtoll() on empty string

# This clamping procedure runs even if there's no default
Expand Down Expand Up @@ -2577,7 +2577,7 @@ def str_value(self):
if expr_value(cond):
val = val_expr.str_value
self._write_to_conf = True
break
#break

# Corresponds to SYMBOL_AUTO in the C implementation
if self.env_var is not None:
Expand Down Expand Up @@ -2620,7 +2620,7 @@ def tri_value(self):
if cond_val:
val = min(expr_value(default), cond_val)
self._write_to_conf = True
break
#break

# Weak reverse dependencies are only considered if our
# direct dependencies are met
Expand Down

0 comments on commit 5187d4b

Please sign in to comment.