I am attempting to parse an httpd.conf file using augeas. I found the httpd.aug and httpd.conf files associated with ticket #100. I downloaded the latest git tree, built, and installed it. I then downloaded the httpd.aug and the example httpd.conf files and attempted to load the file in augtool. Initially augtool was unable to parse the file at all. I found that httpd.aug had an error when it got to the comments inside the IfModule declarations. In order to fix this I applied the patch in [1]. After that the httpd.conf file was loaded and I was able to see the sections fine. The problem I am currently having is that after I have loaded the file, made a change, and then tried to save that change it fails as shown in [2]. As I somewhat suspected when I place some debugging output in it seems to be failing during the comment sections. I'd really like to have this working and am hoping someone can point out some error I've done with my edit to the .aug file, or with how I am trying to use augtool. If this is a bug, I'd be glad to file something in trac and attach any files that might help with the debugging.<div>
<br></div><div>Regards,</div><div>Brandon<br><div><br></div><div><br></div><div>[1]</div><div><div>--- httpd.aug   2010-01-21 12:35:01.000000000 -0500</div><div>+++ git/lenses/httpd.aug        2010-02-22 16:00:04.428722610 -0500</div>
<div>@@ -47,7 +47,7 @@</div><div> </div><div> (*let rec nesIf  = sec "IfModule" (nesIf|directive|comment)* *)</div><div> let rec nesIf  =  [ wskey ("<IfModule") . params secarg . Util.del_str ">" . eol . </div>
<div>-        (directive|nesIf)* . del ws "" . Util.del_str("</IfModule>") . eol ]</div><div>+        (directive|nesIf|comment)* . del ws "" . Util.del_str("</IfModule>") . eol ]</div>
<div> (* What we want ot say is *)</div><div> (* let rec body = (directive|comment)* | ifModule body | directory body | ... *)</div><div> (* but we can't typecheck that *)</div></div><div><br></div><div>[2]</div><div>
<div>[brandon@f12 augeas]$ augtool -b</div><div>augtool> set /files/etc/httpd/conf/httpd.conf/KeepAlive On</div><div>augtool> save</div><div>Saving failed</div><div>augtool> </div></div><div><br></div></div>