[augeas-devel] [PATCH 1 of 2] Add puppet.aug and associated test

David Lutterkort dlutter at redhat.com
Fri Aug 15 00:01:49 UTC 2008


On Thu, 2008-08-14 at 09:34 +0200, Raphaël Pinson wrote:


> Actually, looking at your comments about how PHP can have entries
> outside of sections makes me think that this shouldn't be the default
> behaviour for INI Files imo, or if it is, then it shouldn't be this
> way for PHP at least. We cannot predict the keys for php.ini, and
> there might be key/value pairs outside of sections, which means that
> there will be ambiguities on put between entries outside of sections
> and sections themselves if we map the sections with keys.
> 
> "
> field=value
> [section]
> field2=value2
> "
> 
> would turn into
> 
> { "field" = "value" }
> { "section"
>     { "field2" = "value2" } }
> 
> 
> So put won't know whether field is a section of an entry.
> 
> Of course, having entries outside of sections is not a normal
> behaviour for an INI File, so maybe I should find a trick in php.aug
> instead.

Ugh .. yeah; one way would be to use a special section name that can't
be used for 'real' sections. Or if you want to stick with the fixed
'section' label, to use another label, like 'anon' or 'toplevel' or so
for the entries outside any section

David





More information about the augeas-devel mailing list