[augeas-devel] Proposed changes in IniFile

Raphaël Pinson raphael.pinson at camptocamp.com
Thu Jan 10 15:56:04 UTC 2013


Hello,


The IniFile module is probably the first generic module we introduced
after Util, and it's been there for quite some time.

As Dominic and I were considering providing an Augeas-based Puppet
provider for generic inifiles (similar to Chris Prices' [0]), I tried
to write loose lenses that could be used out-of-the-box for most
cases, and I ended up making quite a few changes.

Here are the proposed changes and their issues:

* Supporting smart quotes (ala Quote.quote_spaces) by default. This
has caused problems with IniFile lenses that only support one kind of
comment type (# or ;) and use either # or ; as valid unquoted
characters in their values;
* Using Util.comment_generic. This has been quite smooth change, but
it means we must manage empty comments in the empty definition (like
everywhere else);
* Using Util.empty instead of [ eol ] to be in tune with the rest of
the lenses. This has mostly caused issues with multiline lenses and
empty comments, since comment must not be indented in multiline
IniFile lenses.

The current changes are available in a branch on github [1]. The yum
lens is still broken and the avahi lens segfaults (and I haven't been
able to reproduce with a simpler case).

Please let me know which changes you think might be worth keeping.


Raphaël



[0] https://github.com/cprice-puppet/puppetlabs-inifile
[1] https://github.com/raphink/augeas/compare/dev;inifile




More information about the augeas-devel mailing list