<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Kconfiglib.git/kconfiglib.py, branch v1.0.2</title>
<subtitle>Fork of https://github.com/zephyrproject-rtos/Kconfiglib.git</subtitle>
<id>https://git.mcdonnell.dev/Kconfiglib.git/atom?h=v1.0.2</id>
<link rel='self' href='https://git.mcdonnell.dev/Kconfiglib.git/atom?h=v1.0.2'/>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/'/>
<updated>2017-09-24T12:11:56Z</updated>
<entry>
<title>Use os.access() in get_defconfig_filename()</title>
<updated>2017-09-24T12:11:56Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2017-09-24T12:06:36Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=3b5633913d18e06c5c36c103b9f160cce114ad9e'/>
<id>urn:sha1:3b5633913d18e06c5c36c103b9f160cce114ad9e</id>
<content type='text'>
...instead of os.path.exists(). This more closely mimics the test in the
C implementation, which boils down to fopen(file, "r") == NULL.

Could open(filename) and catch exceptions too, but it might be
overkilling things.
</content>
</entry>
<entry>
<title>Fix defconfig srctree absolute/relative mixup bug</title>
<updated>2017-09-24T12:03:41Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2017-09-24T11:47:04Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=b9509c0fbc13679393389611a5c4b88b0324306a'/>
<id>urn:sha1:b9509c0fbc13679393389611a5c4b88b0324306a</id>
<content type='text'>
This code in zconf.l says !=, not ==. Thought the behavior seemed weird.

	if (!f &amp;&amp; name != NULL &amp;&amp; name[0] != '/') {
		env = getenv(SRCTREE);
		if (env) {
			sprintf(fullname, "%s/%s", env, name);
			f = fopen(fullname, "r");
		}
	}
	return f;

Thankfully only broken for a short while. Also gives much simpler code.
</content>
</entry>
<entry>
<title>Handle path cleanups in a cleaner way</title>
<updated>2017-09-24T11:14:25Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2017-09-24T11:09:11Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=62c63e03ec968f0a38fb6d05222336c4e738dcd2'/>
<id>urn:sha1:62c63e03ec968f0a38fb6d05222336c4e738dcd2</id>
<content type='text'>
_clean_up_path() was only ever passed filenames, so stripping trailing
slashes was redundant. Better to strike at the root of the problem too,
which is the os.path.join() with 'base_dir' defaulting to ".".

The old hack gave incorrect results in obscure cases: Turning .//oops
into /oops is wrong.

The new version should be Windows-friendly as well.
</content>
</entry>
<entry>
<title>Remove defaulted open() "r" argument</title>
<updated>2017-09-24T11:13:48Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2017-09-24T10:40:20Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=0c3e0363d705be84f8cd06c1b4609927166d8b34'/>
<id>urn:sha1:0c3e0363d705be84f8cd06c1b4609927166d8b34</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix get_defconfig_filename() $srctree search order</title>
<updated>2017-09-24T09:37:42Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2017-09-24T07:49:20Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=799e6d4e1a4e4a4f59e58298bbb9c01d286159dc'/>
<id>urn:sha1:799e6d4e1a4e4a4f59e58298bbb9c01d286159dc</id>
<content type='text'>
Previously, $srctree/path/to/defconfig would be looked up before
/path/to/defconfig, and the code wouldn't check if /path/to/defconfig
was an absolute path ($srctree is ignored otherwise). Sloppy old
oversights. The behavior now fully matches the C implementation.

Also fix some related things:

 - An 'if m' suffices to select a defconfig. We previously required 'y'.

 - Make the code less hacky and possibly more Windows-friendly by using
   os.path.relpath() to de-absolutize paths, and stop using
   os.path.normpath() as it could change the meaning of paths that
   contain symbolic links.

 - Explain what happens if 'option defconfig_list' is set on multiple
   symbols and print a warning in that case.

 - Fix get_srctree(). It would previously return "." instead of None if
   $srctree was unset at parse time. Somehow forgot to to test this. The
   code is now much more straightforward.
</content>
</entry>
<entry>
<title>Add _parse_cond() helper for some 'if &lt;y&gt;' cases</title>
<updated>2017-09-24T06:05:31Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2017-09-24T05:31:57Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=27fe993b0e36b0598b0dc16c1b7ae417389562f8'/>
<id>urn:sha1:27fe993b0e36b0598b0dc16c1b7ae417389562f8</id>
<content type='text'>
There's already parse_val_and_cond(), which handles '&lt;x&gt; if &lt;y&gt;' where
both &lt;x&gt; and &lt;y&gt; need to be parsed. Add a corresponding _parse_cond()
helper which can be used in cases where only &lt;y&gt; should be parsed (for
'select', 'imply', and 'range').

Also move both _parse_val_and_cond() and _parse_cond() outside
_parse_properties(). More explicit, and shows a small performance
improvement during parsing.
</content>
</entry>
<entry>
<title>Explain why _make_and() can return None</title>
<updated>2017-09-22T05:58:06Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2017-09-22T05:56:46Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=e532c2a7d34cbde528c0c91c83594a0694c9256f'/>
<id>urn:sha1:e532c2a7d34cbde528c0c91c83594a0694c9256f</id>
<content type='text'>
Makes ANDs between nonexistent expressions yield a nonexistent
expression.
</content>
</entry>
<entry>
<title>Explain the expression structure clearer</title>
<updated>2017-09-22T05:11:56Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2017-09-22T05:10:42Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=240add8c97403fa77b38a89961becb3476a3c359'/>
<id>urn:sha1:240add8c97403fa77b38a89961becb3476a3c359</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Simplify _expr_to_str()</title>
<updated>2017-09-22T05:02:05Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2017-09-22T03:59:08Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=8f81cbdcc1d35eeb419c96968d4eedbfeee42e55'/>
<id>urn:sha1:8f81cbdcc1d35eeb419c96968d4eedbfeee42e55</id>
<content type='text'>
 - Get rid of _sym_str_string(), which was only used here.

 - Remove 'if expr is None' case that could never trigger

 - Add a test for printing string symbols, as they are a bit tricky:
   Default values should not be evaluated to tristate values.
</content>
</entry>
<entry>
<title>Simplify expression representation</title>
<updated>2017-09-21T18:21:00Z</updated>
<author>
<name>Ulf Magnusson</name>
<email>ulfalizer@gmail.com</email>
</author>
<published>2017-09-21T17:07:47Z</published>
<link rel='alternate' type='text/html' href='https://git.mcdonnell.dev/Kconfiglib.git/commit/?id=2de42031515a88d9847889e2d742b7066e33c26e'/>
<id>urn:sha1:2de42031515a88d9847889e2d742b7066e33c26e</id>
<content type='text'>
Store simple (&lt;operator&gt;, &lt;operand 1&gt;, &lt;operand 2&gt;) tuples instead of
(&lt;operator&gt;, [list of operands]) tuples.

The thought process behind the original representation was to avoid
creating lots of nodes for long X &amp;&amp; Y &amp;&amp; Z &amp;&amp; ... chains that sometimes
appear, and possibly speed up evaluation. In retrospect, it's pretty
bad, for the following reasons:

 1) _make_and() and _make_or() created lots of new merged lists instead
    of simply reusing the tuples already allocated for the
    subexpressions. This is slow and memory hungry.

 2) Any gain in evaluating long expressions would barely offset slower
    evaluation of short expressions.

 3) The code became more complex.

Most importantly, this change makes expressions more straightforward to
work with for people peeking into internals.
</content>
</entry>
</feed>
