[augeas-devel] Re: "ins" statement in augtool can corrupt the edited file

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


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

> On Mon, 29 Sep 2008 11:56:17 +0200
> "Raphaël Pinson" <raphink at gmail.com>
> wrote:
>
> > On Mon, Sep 29, 2008 at 11:51 AM, Marc Fournier <
> > marc.fournier at camptocamp.com> wrote:
> >
> > > Hello,
> > >
> > > I noticed that when using the following statement in augtool, part
> > > of the edited file gets lost (at least when using the inifile lens):
> > >
> > > "ins item=value <WHERE> <PATH>"
> > >
> >
> >
> > I think the problem is that "=" should not be accepted in a node
> > name, just like "/" is already excluded. This is a problem with
> > Augeas rather than augtool imo.
>
> In this case, augeas should probably ask the lens-file which separators
> are in use in the current file (the "del" parameter I think). I can
> imagine some files could use ":" or "->" or even a blank space as a
> separator, while others would allow these same characters in key names.
>


If I understand the problem correctly, it's not a problem of the separator
used in the conffile, but of the separator used in the Augeas tree.

When you have

/file/field=value

it's supposed to be mapped into a field with a value. Now if you you have
"=" in the field name, you don't know if "field=value" is the field name or
if the key/value pair.


Raphaël
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/augeas-devel/attachments/20080929/185fd468/attachment.htm>


More information about the augeas-devel mailing list