[augeas-devel] Proposed changes in IniFile

Raphaël Pinson raphael.pinson at camptocamp.com
Thu Jan 10 16:24:35 UTC 2013


Some news:

I fixed both avahi.aug and yum.aug (although I didn't manage to explain the
segfault), so all the tests pass now.

Other people using the IniFile generic lens might have to adjust their
lenses (and tests) though if we keep these changes.

The branch is up-to-date with these changes.


Raphaël


On Thu, Jan 10, 2013 at 4:56 PM, Raphaël Pinson <
raphael.pinson at camptocamp.com> wrote:

> 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
>
> _______________________________________________
> augeas-devel mailing list
> augeas-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/augeas-devel
>



-- 
Raphaël Pinson
Administrateur Systèmes & Réseaux
Camptocamp France
Savoie Technolac
BP 352
48, avenue du Lac du Bourget
73372 Le Bourget du Lac, Cedex
www.camptocamp.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/augeas-devel/attachments/20130110/b5a7a47d/attachment.htm>


More information about the augeas-devel mailing list