On 26 Nov 2012, at 11:37 AM, Dominic Cleal <[email protected]> wrote:

> It's a problem with the lens - it's too simplistic.  There's another
> report of it here:
> https://fedorahosted.org/augeas/ticket/265
> 
> The only way to get round it is to take the value of the node from the
> Augeas API, parse it yourself and set the value you want.  Unless the
> lens breaks apart a string into nodes, that's all you can do.  There are
> no helpers in the Augeas API for this, since it should be done in the lens.
> 
> As per the bug, there's a good argument for splitting lists up in the
> lens, despite it being a backwards-incompatible change.  I expect we'd
> welcome a patch to the lens to fix this.

I tried to come up with a patch but couldn't get the regexes right, what I was 
trying to do was detect a key value pair as an "entry", and a key with a value 
containing a comma as an array, but I had no luck with finding a non ambiguous 
regex.

What I did find was some convenience modules at 
http://augeas.net/docs/references/lenses/files/build-aug.html that allowed you 
to match key value pairs of various forms, but it stopped short of offering a 
key-value-array form that could be split over multiple lines. If we had that, 
we could crack the postfix config file.

Regards,
Graham
--

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
augeas-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/augeas-devel

Reply via email to