[augeas-devel] 'parse_failed'

Matthew Booth mbooth at redhat.com
Thu May 13 09:11:53 UTC 2010


On 12/05/10 22:27, David Lutterkort wrote:
> 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.

Makes sense. Thanks, David.

Matt
-- 
Matthew Booth, RHCA, RHCSS
Red Hat Engineering, Virtualisation Team

M:       +44 (0)7977 267231
GPG ID:  D33C3490
GPG FPR: 3733 612D 2D05 5458 8A8A 1600 3441 EA19 D33C 3490




More information about the augeas-devel mailing list