Skip to content

Commit

Permalink
moveconfig: Ignore duplicate configs when moving
Browse files Browse the repository at this point in the history
When moving configs, it is important to know what was defined in the
config header even if it duplicates the configs coming from Kconfig.

This is specifically needed for the case where a config is set to
default 'y' in the Kconfig. This would previously cause the actual value
from the include config to be filtered out, and moveconfig.py would
think that it was 'n'... This means that the value that should be 'y'
is now (in every defconfig) set to 'not set'.

tools/moveconfig.py now defines KCONFIG_IGNORE_DUPLICATES to prevent the
filtering from happening and selecting wrong values for the defconfig.

Signed-off-by: Joe Hershberger <[email protected]>
Acked-by: Masahiro Yamada <[email protected]>
  • Loading branch information
jhershbe authored and masahir0y committed May 26, 2015
1 parent 96464ba commit 7740f65
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/Makefile.autoconf
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ quiet_cmd_autoconf = GEN $@
$(CPP) $(c_flags) $2 -DDO_DEPS_ONLY -dM $(srctree)/include/common.h > [email protected] && { \
sed -n -f $(srctree)/tools/scripts/define2mk.sed [email protected] | \
while read line; do \
if ! grep -q "$${line%=*}=" include/config/auto.conf; then \
if [ -n "${KCONFIG_IGNORE_DUPLICATES}" ] || \
! grep -q "$${line%=*}=" include/config/auto.conf; then \
echo "$$line"; \
fi \
done > $@; \
Expand Down
1 change: 1 addition & 0 deletions tools/moveconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,7 @@ def poll(self):
cmd = list(self.make_cmd)
if cross_compile:
cmd.append('CROSS_COMPILE=%s' % cross_compile)
cmd.append('KCONFIG_IGNORE_DUPLICATES=1')
cmd.append('include/config/auto.conf')
self.ps = subprocess.Popen(cmd, stdout=self.devnull)
self.state = STATE_AUTOCONF
Expand Down

0 comments on commit 7740f65

Please sign in to comment.