[augeas-devel] Need help with logrotate lens enhancement

Raphaël Pinson raphink at gmail.com
Sun Sep 28 18:12:51 UTC 2008


Hi Sean,

Thanks for the patch, it looks very nice. I based the initial lens on the
options I usually use, so I'm not surprised it's lacking fields. However,
list_to_eol is not used as of now. I think it would be actually better to
use it instead of defining tabooext separately. So you would have

let list_item = [ sep_spc . key /[^\/+,# \n\t{}]+/ ]
let list_to_eol (kw:string) (indent:string)
     = [ del /[ \t]*/ indent . key kw . ( sep_spc . store /\+/ )? .
list_item+ . eol ]


let attrs (indent:string) =
    ...
    | list_to_eol "tabooext" indent
    | list_to_eol "compressoptions" indent

This way, you don't have to redefine a specific field for tabooext. That
said, the checks are less stricts on "compressoptions".

It would also be nice to try and limit lines to 80 (or preferably 75)
characters and begin to document the code (with NaturalDocs, I might begin
to do that for all lenses when I get some time).


Raphael




On Sun, Sep 28, 2008 at 2:50 AM, Sean E. Millichamp <sean at bruenor.org>wrote:

> On Sat, 2008-09-27 at 09:45 +0200, Dominique Dumont wrote:
>
> > From what I've understood, Augeas cannot decide which lenses will
> > apply to 'tabooext + A'.
>
> > I do not know exactly logrotate syntax, but you may want to exclude
> > the '+' character from list_item:
> >
> > let list_item = [ sep_spc . key /[^\/,# \n\t{}\+]+/ ]
>
> Thanks Dominique, that was it exactly.
>
> I have re-attached the patch.  This one should be ready to go.
>
> Sean
>
>
> _______________________________________________
> augeas-devel mailing list
> augeas-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/augeas-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/augeas-devel/attachments/20080928/932c6612/attachment.htm>


More information about the augeas-devel mailing list