From 7b4f72fa7a19b7c38312a6f6fd553ca45f04e9a6 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Sat, 8 Dec 2018 00:41:01 +0100 Subject: Make {load,write}_config(filename=None) implement the standard behavior Make the previously obligatory 'filename' argument to load_config() and write_config() default to None, and have that implement the behavior you'd usually want: read/write either KCONFIG_CONFIG or ".config" if unset, and read the 'option defconfig_list' configuration file if KCONFIG_CONFIG/".config" doesn't exist. For load_config(), filename=None also allows the configuration file to be missing without raising an error. load_config() returns True if a local configuration file was loaded, which is useful to check in the menuconfig (if no local configuration file exists, we always want to prompt for saving the configuration when exiting). Also add a 'verbose' argument (default True) to load_config() and read_config() that makes them print which files were read/written in filename=None mode. Also generalize olddefconfig.py and oldconfig.py to not require there to already be a local configuration file. This was a bit silly for olddefconfig.py in particular. Remove the examples/defconfig.py script. It's a duplicate of olddefconfig.py. --- README.rst | 2 -- 1 file changed, 2 deletions(-) (limited to 'README.rst') diff --git a/README.rst b/README.rst index ef947be..11a85e9 100644 --- a/README.rst +++ b/README.rst @@ -492,8 +492,6 @@ Example scripts The `examples/ `_ directory contains some simple example scripts. Among these are the following ones. Make sure you run them with the latest version of Kconfiglib, as they might make use of newly added features. -- `defconfig.py `_ has the same effect as going into ``make menuconfig`` and immediately saving and exiting. - - `eval_expr.py `_ evaluates an expression in the context of a configuration. - `find_symbol.py `_ searches through expressions to find references to a symbol, also printing a "backtrace" with parents for each reference found. -- cgit v1.2.3