summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2016-06-15 14:33:50 +0900
committerMasahiro Yamada <yamada.masahiro@socionext.com>2016-06-22 09:22:42 +0900
commit5030159e27a1d6293f0f064807d4eef5dd6de714 (patch)
tree3acb9fb5ab4dc40003ed4584235d82943ec2805d
parent9f823615af919c6b89f0b80197f009f78299dcde (diff)
downloadtalos-obmc-uboot-5030159e27a1d6293f0f064807d4eef5dd6de714.tar.gz
talos-obmc-uboot-5030159e27a1d6293f0f064807d4eef5dd6de714.zip
tools: moveconfig: fix needless move for config with default 1
When moving an integer type option with default value 1, the tool moves configs with the same value as the default (, and then removed by the later savedefconfig). This is a needless operation. The KconfigParser.parse_one_config() should compare the config after the "=y -> =1" fixup. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
-rwxr-xr-xtools/moveconfig.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/moveconfig.py b/tools/moveconfig.py
index 5e5ca06d8f..03acbea94c 100755
--- a/tools/moveconfig.py
+++ b/tools/moveconfig.py
@@ -487,9 +487,6 @@ class KconfigParser:
else:
new_val = not_set
- if old_val == new_val:
- return (ACTION_NO_CHANGE, new_val)
-
# If this CONFIG is neither bool nor trisate
if old_val[-2:] != '=y' and old_val[-2:] != '=m' and old_val != not_set:
# tools/scripts/define2mk.sed changes '1' to 'y'.
@@ -498,7 +495,8 @@ class KconfigParser:
if new_val[-2:] == '=y':
new_val = new_val[:-1] + '1'
- return (ACTION_MOVE, new_val)
+ return (ACTION_NO_CHANGE if old_val == new_val else ACTION_MOVE,
+ new_val)
def update_dotconfig(self):
"""Parse files for the config options and update the .config.
OpenPOWER on IntegriCloud