[augeas-devel] Re: [PATCH] Add mysql.aug and associated test

Raphaël Pinson raphink at gmail.com
Mon Sep 29 12:16:48 UTC 2008


Hi Marc,


Thanks for these patches :)

The include parts look good. I don't think the patch fixes the entry part
though. The problem iirc is to parse lines like :

   someflag    # some comment


"[ key kw . (sep . sto_to_comment)? . (comment|eol) ] | comment" does not
work because there is a space after the keyword without a value, and
"comment" does not remove leading spaces. Maybe an option would be to add an
optional sep in front of comment...



Raphaël




On Mon, Sep 29, 2008 at 12:15 PM, Marc Fournier <
marc.fournier at camptocamp.com> wrote:

> Hello,
>
> I believe the attached patch to Raphaël's mysql lens fixes the problems
> mentioned in previous messages.
>
> I'm not sure if this is the exact implementation of what David suggested in
> his message of Wed, 03 Sep 2008 21:28:44. But the unit tests seem to work
> now and I have successfully been able to add/edit/remove flag items,
> key/value items and !include/!includedir from my my.cnf.
>
> Let me know if something seems wrong. It's my first attempt to modify a
> lensfile and I'm not sure to have the full understanding of whe way things
> work yet...
>
> Marc
>
> On Thu, Sep 11, 2008 at 06:35:42PM +0200, Raphaël Pinson wrote:
> > On Thu, Sep 11, 2008 at 4:51 PM, Marc Fournier <
> marc.fournier at camptocamp.com
> > > wrote:
> >
> > > Hello,
> > >
> > > I just wanted to draw your attention to the fact mysql also
> > > allows this type of records:
> > >
> > >  !include /path/to/file.cnf
> > >
> > > I suppose modifying the regex this way should work:
> > >
> > >  /include(dir)?/
> > >
> >
> >
> > Thanks. I was told about it but didn't add it yet. This change should do
> for
> > sure.
> >
> >
> >
> > >
> > > I'm already trying out mysql.aug with puppet and i'm looking forward to
> > > see this lens included in augeas :-)
> >
> >
> > If you have any time to try and fix the double "?" issue, I would be
> really
> > happy to get a patch since I'm not focused on this lens right now.
> >
> >
> > Raphaël
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/augeas-devel/attachments/20080929/6b371ed4/attachment.htm>


More information about the augeas-devel mailing list