[augeas-devel] logrotate lense - multiple files

haerry+augeas at puzzle.ch haerry+augeas at puzzle.ch
Tue Jun 2 09:24:20 UTC 2009


Hi

>> However would the onlyif avoid unnecessary augeas calls?
> 
> Yes, it would - if nothing needs to be done, only one call would be made
> to evaluate the onlyif condition; I doubt that it will save any time
> though.

ok, good to know.

>> It looks a bit ugly to do all that, but if understood it correctly the
>> following reasons are responsible for it:
> 
> Yeah, I wish I had a simpler way to express what the tree is supposed to
> look like, but don't really have a better language for that. There's
> probably also some room to make the language for the 'changes' parameter
> a little friendlier. Suggestions welcome ;)

it was more just a general note and I fully understand why it have to be
that way. I never intended to complain. ;)

The only suggestion would be that it would get smaller and more readable
(meaning: wth are these statements doing?) if there would be some kind
of macro or direct augeas command, which would do the transformation to
the list automagically. Because with the current solution it's not
obvious for everybody at the first glance.

>> The normal file is just a single value, however to add an additional
>> file to the logrotate, we need to transform this to a list. So we first
>> remove the list, then create it and afterwards fill it up?
> 
> Yes, that's correct; this case is complicated by the fact that 'file'
> nodes need to come first underneath a 'rule' node.

I see.

thanks a lot for your explanations.

cheers Marcel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 259 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/augeas-devel/attachments/20090602/5aa7a9a2/attachment.sig>


More information about the augeas-devel mailing list