[augeas-devel] [Augeas] #130: Put rountrip error with recursive lens
Augeas
trac at fedorahosted.org
Fri Jul 23 18:50:17 UTC 2010
#130: Put rountrip error with recursive lens
-------------------------+--------------------------------------------------
Reporter: fgiraldeau | Owner: lutter
Type: defect | Status: new
Priority: critical | Milestone: next
Component: Augeas | Version: devel
Resolution: | Keywords:
-------------------------+--------------------------------------------------
Comment (by fgiraldeau):
The error root is put_union. Here is the union lens to process.
{{{
L_UNION
|
-------------
| |
L_REC L_DEL
|
...
}}}
On line put_union.c:477 the call to applies(lens, state) returns true for
both the L_REC and L_DEL. By switching the order in the union, the L_DEL
is processed before L_REC, and the output is correct.
{{{
--- ../lenses/tests/test_xml_put.aug.orig 2010-07-23
14:48:04.722236998 -0400
+++ ../lenses/tests/test_xml_put.aug 2010-07-23 14:48:12.433237771
-0400
@@ -7,7 +7,7 @@
let h = del ">" ">" . body . del "</" "</" in
[ del /<[ ]*/ "< " . key tags . h . del tags "li" . del ">" ">"
]*
-let rec content_reg = element_regular (content_reg|text)
+let rec content_reg = element_regular (text|content_reg)
let doc_reg = content_reg
let input2 = "<ul><li>test7</li><li>test8</li></ul>"
}}}
--
Ticket URL: <https://fedorahosted.org/augeas/ticket/130#comment:1>
Augeas <http://augeas.net/>
a configuration API
More information about the augeas-devel
mailing list