[augeas-devel] Need help with logrotate lens enhancement
Dominique Dumont
domi.dumont at free.fr
Sat Sep 27 07:45:20 UTC 2008
"Sean E. Millichamp" <sean at bruenor.org> writes:
> logrotate.aug:105.3-.54:Failed to compile lns
> logrotate.aug:43.36-.113:exception: ambiguous concatenation
> 'tabooext + A' can be split into
> 'tabooext|=| + A'
>
> and
> 'tabooext +|=| A'
>
> First lens: logrotate.aug:43.36-.100
> Second lens: logrotate.aug:43.103-.113
>
> logrotate.aug: error: Loading failed
>
> Any ideas?
>From what I've understood, Augeas cannot decide which lenses will
apply to 'tabooext + A'.
In tabooext lens you have:
key "tabooext" . ( sep_spc . store /\+/ )? . list_item+ . eol
In fact, ' +' may satisfy '( sep_spc . store /\+/ )?' or list_item+.
>From you lens, Augeas can consider '+' as a valid list_item.
Unlike other regexp engine like Perl, Augeas does not give priority to
'( sep_spc . store /\+/ )?' because it can be satisfied first.
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{}\+]+/ ]
HTH
More information about the augeas-devel
mailing list