From dd0e227216e247d2040cdd40bf7397702880cdc4 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Mon, 9 Oct 2017 23:05:00 +0200 Subject: Kconfiglib 2 backup WIP --- examples/defconfig_oldconfig.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'examples/defconfig_oldconfig.py') diff --git a/examples/defconfig_oldconfig.py b/examples/defconfig_oldconfig.py index 9a85440..98173e7 100644 --- a/examples/defconfig_oldconfig.py +++ b/examples/defconfig_oldconfig.py @@ -7,6 +7,10 @@ # yes n | make oldconfig # # This came up in https://github.com/ulfalizer/Kconfiglib/issues/15. +# +# Usage: +# +# $ make [ARCH=] scriptconfig SCRIPT=Kconfiglib/examples/defconfig_oldconfig.py import kconfiglib import sys @@ -19,15 +23,15 @@ conf.write_config(".config") # Mirrors the first oldconfig conf.load_config(".config") -conf["ETHERNET"].set_user_value('n') +conf.syms["ETHERNET"].set_value('n') conf.write_config(".config") # Mirrors the second oldconfig conf.load_config(".config") -conf["ETHERNET"].set_user_value('y') +conf.syms["ETHERNET"].set_value('y') for s in conf: - if s.get_user_value() is None and 'n' in s.get_assignable_values(): - s.set_user_value('n') + if s.user_value is None and 'n' in s.assignable: + s.set_value('n') # Write the final configuration conf.write_config(".config") -- cgit v1.2.3