[augeas-devel] 'parse_failed'

David Lutterkort lutter at redhat.com
Wed May 12 21:27:49 UTC 2010


On Wed, 2010-05-12 at 17:53 +0100, Matthew Booth wrote:
> My (just posted) patch for /etc/modules.conf includes a simple test
> including the directives it parses which Modprobe doesn't. For a more
> real-world test, I found this beast of a modules.conf:
> 
> http://www.janerob.com/rob/ts5100/modules.conf
> 
> I copied my modules.aug into /usr/share/augeas/lenses, and put the above
> file in /etc/modules.conf. augeas fails to parse it. Output is:
> 
> [root at t500 tmp]# augtool
> augtool> ls /etc/modules.conf
> augtool> match /augeas//error
> /augeas/files/etc/modules.conf/error = parse_failed

Just played with that. Here's the full error:

        augtool> print /augeas//error
        /augeas/files/etc/modules.conf/error = "parse_failed"
        /augeas/files/etc/modules.conf/error/pos = "736"
        /augeas/files/etc/modules.conf/error/line = "16"
        /augeas/files/etc/modules.conf/error/char = "0"
        /augeas/files/etc/modules.conf/error/lens = "/homes/lutter/code/augeas/lenses/modules.aug:55.10-.32:"
        /augeas/files/etc/modules.conf/error/message = "Iterated lens matched less than it should"
        
Line 16 is the first non-comment, the instruction 'keep'.

Looking at the file in Emacs, it has DOS line endings. Running dos2unix
on it fixes the problem - I'd assume that the DOS line endings are an
artifact of downloading the file from a web server, not the way any sane
person would store modules.conf on their Linux machine.

David







More information about the augeas-devel mailing list