<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Kconfiglib.git/examples, branch v13.6.0</title>
<subtitle>Fork of https://github.com/zephyrproject-rtos/Kconfiglib.git</subtitle>
<id>https://git.mcdonnell.dev/Kconfiglib.git/atom?h=v13.6.0</id>
<link rel='self' href='https://git.mcdonnell.dev/Kconfiglib.git/atom?h=v13.6.0'/>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/'/>
<updated>2019-12-14T17:12:07Z</updated>
<entry>
<title>Add Kconfig.__init__() helper flag for suppressing tracebacks</title>
<updated>2019-12-14T17:12:07Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2019-12-14T17:04:09Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=1ec91703ecdb4c369212fabe2ca0a68f040b7697'/>
<id>urn:sha1:1ec91703ecdb4c369212fabe2ca0a68f040b7697</id>
<content type='text'>
Tools that don't use standard_kconfig() currently generate spammy
tracebacks for e.g. syntax errors.

Add a suppress_traceback flag to Kconfig.__init__() for catching
"expected" exceptions and printing them to stderr and exiting with
status 1. Use it to make all tools consistently hide tracebacks.
</content>
</entry>
<entry>
<title>Add public helpers for generating "&lt;name&gt; (defined at ...)" strings</title>
<updated>2019-10-29T17:30:46Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2019-10-29T15:41:03Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=e1ccf19f9f5fc896dfeef15883d2cb455cbbb937'/>
<id>urn:sha1:e1ccf19f9f5fc896dfeef15883d2cb455cbbb937</id>
<content type='text'>
Have Symbol/Choice.name_and_loc return strings like

    "MY_SYM (defined at foo:1, bar:2)"
    "&lt;choice&gt; (defined at foo:4)"

I've added a function like that in at least four different scripts now,
so that's probably a sign that it's a worthwhile helper.

Clean up the tests/Klocation tests a bit while adding tests.
</content>
</entry>
<entry>
<title>Catch EnvironmentError instead of OSError/IOError</title>
<updated>2019-07-01T22:03:02Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2019-07-01T20:52:17Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=e5e2fe5a6f084fb98c2c9b4adec0383fec4a5256'/>
<id>urn:sha1:e5e2fe5a6f084fb98c2c9b4adec0383fec4a5256</id>
<content type='text'>
menuconfig.py tended to crash on I/O errors on Python 2, due to
forgetting to update some 'except OSError's. Catch EnvironmentError
instead.

EnvironmentError is a common base class of IOError and OSError on Python
2, and an alias for OSError on Python 3. Use it elsewhere too, as it
might help catch obscure I/O errors on Python 2.
</content>
</entry>
<entry>
<title>dumpvars: Make the output format copy-pasteable</title>
<updated>2019-06-07T04:10:04Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2019-06-06T18:45:45Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=f503ea39a10f685bf3fc2fb21f2748aad6c5ee99'/>
<id>urn:sha1:f503ea39a10f685bf3fc2fb21f2748aad6c5ee99</id>
<content type='text'>
Have it write assignments on a single line that can be copy-pasted
before a command.
</content>
</entry>
<entry>
<title>Improve warning control API (with backwards compatibility)</title>
<updated>2019-06-03T04:50:06Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2019-06-02T23:55:50Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=bf36f5de0f49d56975b1a844e25484ec385dc971'/>
<id>urn:sha1:bf36f5de0f49d56975b1a844e25484ec385dc971</id>
<content type='text'>
A wart of the warning control API (enable/disable_*_warnings()) is that
the current warning settings can't be queried. Querying warning settings
is useful in functions that want to temporarily enable/disable some
warning and then put things back to how they were.
kconfiglib.load_allconfig() ran into this, for example.

Make the internal warning control variables public (improve the naming
at the same time), and encourage just setting them directly. Keep the
old API for backwards compatibility.

Also remove _warn_redun_assign() and _warn_override(). They're trivial
and were called in a single place.
</content>
</entry>
<entry>
<title>Have load_config() and write_(min_)config() return messages</title>
<updated>2019-06-03T04:50:06Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2019-06-02T16:15:59Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=55bc8c380869ea663092212e8fe388ad7abae596'/>
<id>urn:sha1:55bc8c380869ea663092212e8fe388ad7abae596</id>
<content type='text'>
Hardcoding load_config() and write_(min_)config() to write any message
to stdout is awkward, because it means that the message can't be easily
reused when stdout is the wrong place to write it to (e.g. in
menuconfig/guiconfig). This gets extra bad now that there's also the "No
change to ..." message.

Modify load_config() and write_(min_)config() to return the message as a
string instead, and have them always return a message, instead of just
when 'filename' is None and verbose=True. This makes things flexible and
straightforward.

Use the new behavior in menuconfig.py and guiconfig.py. They now show
"No change to ..." when saving a file doesn't modify it.

Tools that want to write messages to stdout should now do
print(kconf.load_config()) / print(kconf.write_config()).

There's no clean way to preserve perfect backwards compatibility here,
but keep accepting the 'verbose' argument and print a deprecation
warning if a value is ever passed for it. That way, scripts will keep
running, though possibly with less output on stdout.

This changes the meaning of the load_config() return value as well,
though I suspect it was only ever used by the menuconfig/guiconfig
interfaces.

The new behavior applies for kconfiglib.VERSION &gt;= (12, 0, 0).
</content>
</entry>
<entry>
<title>Strip direct deps. from property conditions in Symbol/Choice/MenuNode.__str__()</title>
<updated>2019-05-25T14:18:29Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2019-05-25T11:52:09Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=bb33eed5cc6bdce2b65aa570ecd9a400bcd9c180'/>
<id>urn:sha1:bb33eed5cc6bdce2b65aa570ecd9a400bcd9c180</id>
<content type='text'>
Commit e81a77b ("Consistently put direct deps. last when propagating")
makes the position of the direct deps. in property conditions
predictable after dependency propagation, making it easy to strip them
as needed.

Use this to implement MenuNode.orig_{prompt,defaults,selects,implies,ranges},
which work like the non-orig_* versions but omit the direct deps. Use
those in turn to omit the direct deps in Symbol/Choice.__str__().

The direct deps. (with propagated parent deps.) can still be seen after
'depends on ...', so there is no loss of information.

This unclutters Kconfig definitions shown in menuconfig/guiconfig and in
any generated documentation. The old output also had duplicated
dependencies, though it doesn't matter for evaluation.

Before:

  config A
  	bool
  	prompt "A" if DEP
  	default y if FOO &amp;&amp; DEP
  	depends on DEP

After:

  config A
  	bool
  	prompt "A"
  	default y if FOO
  	depends on DEP
</content>
</entry>
<entry>
<title>String repetition consistency nit</title>
<updated>2019-05-19T00:26:13Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2019-05-19T00:24:45Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=57e3aa38707a5b827d987b10dbf999e7081076cd'/>
<id>urn:sha1:57e3aa38707a5b827d987b10dbf999e7081076cd</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Use a consistent style in examples</title>
<updated>2019-03-06T01:15:29Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2019-03-06T01:10:20Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=66557edc120faac569004ba2bc426c5ac6a1100b'/>
<id>urn:sha1:66557edc120faac569004ba2bc426c5ac6a1100b</id>
<content type='text'>
Also remove some unused imports.
</content>
</entry>
<entry>
<title>Make {load,write}_config(filename=None) implement the standard behavior</title>
<updated>2018-12-08T02:28:52Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2018-12-07T23:41:01Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=7b4f72fa7a19b7c38312a6f6fd553ca45f04e9a6'/>
<id>urn:sha1:7b4f72fa7a19b7c38312a6f6fd553ca45f04e9a6</id>
<content type='text'>
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.
</content>
</entry>
</feed>
