[augeas-devel] Recursive lens and "malformed node" error in put direction

David Lutterkort lutter at redhat.com
Tue Feb 15 00:39:59 UTC 2011


On Mon, 2011-02-14 at 18:15 +0100, Raphaël Pinson wrote:
> Now the problem...
> 
> I manage to do a put with the AptConf.entry lens:
> 
>    (* Test put recursive value *)
>    test AptConf.entry put "APT { Clean-Installed \"true\"; }\n"
>       after set "/APT/Clean-Installed" "false" =
>       "APT { Clean-Installed \"false\"; }\n"
> 
> 
> But a put with the AptConf.lns:
> 
>    (* Test with full lens *)
>    test AptConf.lns put "APT { Clean-Installed \"true\"; }\n"
>       after set "/APT/Clean-Installed" "false" =
>       "APT { Clean-Installed \"false\"; }\n"
> 
> 
> fails with:
> 
>   tests/test_aptconf.aug:120.3-122.44:exception thrown in test
>   tests/test_aptconf.aug:120.8-121.46:exception: Malformed child node
>       Lens: ./aptconf.aug:105.10-.56:
>       Error encountered at path
> 
>   Syntax error in lens definition
>   Failed to load tests/test_aptconf.aug

The error message means 'when putting nodes for a "*", there were nodes
left over at the end' (this needs to be said better in the error
message)

>From looking at your examples, I don't really see what Augeas is
tripping over. Can you send the result of

        test AptConf.lns get "APT { Clean-Installed \"true\"; }\n" = ?
        
Hopefully that has some obvious issues ...

David





More information about the augeas-devel mailing list