[augeas-devel] Re: Creating a custom lense

Dean Wilson dean.wilson at gmail.com
Wed Apr 23 18:59:28 UTC 2008


Helps if I add the files...

On 23/04/2008, Dean Wilson <dean.wilson at gmail.com> wrote:
> After David fixed my configure on Debian issues I thought I should
>  make myself useful. Instead I've got more questions :)
>
>  I've tried writing my own lense for apt-sources (attached) and I've
>  come across a couple of things I've not been able to solve.
>
>  First - when I change one of the literal values in the
>  test_aptsource.aug and run augparse aptsources.aug
>  tests/test_aptsource.aug I don't get failures. Should I? Or am I not
>  invoking the tests correctly?
>
>  Second - I tried to add a hander for blank lines but when I try to use
>  it in "let lns" in the aptsources.aug file I get -
>
>  aptsources.aug:21.1-.41:Failed to compile lns
>  aptsources.aug:21.13-.28:exception: useless tree union: the first lens
>  completely shadows the second lens
>     First lens: aptsources.aug:10.16-.37
>     Second lens: aptsources.aug:11.16-.48
>
>  I've seen lenses built of more than one element in the examples so I'm
>  guessing I've got something else wrong.
>
>  Third -
>
>  I can't write newly added apt-sources back out to disk -
>
>  set /files/etc/apt/sources.list/4/type deb
>  set /files/etc/apt/sources.list/4/uri ftp://mirror.bytemark.co.uk/debian/
>  set /files/etc/apt/sources.list/4/distribution etch/updates
>  set /files/etc/apt/sources.list/4/component[1] main
>  set /files/etc/apt/sources.list/4/component[2] notmain
>
>  augtool> save
>  /usr/share/augeas/lenses/aptsources.aug:15.17-19.22:Short split for concat
>
>  Any pointers or help for any of these three is much appreciated.
>
>   Dean
>
> --
>  Dean Wilson               http://www.unixdaemon.net
>  Profanity is the one language all programmers understand
>  --- Anon
>


-- 
Dean Wilson               http://www.unixdaemon.net
Profanity is the one language all programmers understand
--- Anon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: aptsources.aug
Type: application/octet-stream
Size: 879 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/augeas-devel/attachments/20080423/4f6982a3/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_aptsource.aug
Type: application/octet-stream
Size: 1987 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/augeas-devel/attachments/20080423/4f6982a3/attachment-0001.obj>


More information about the augeas-devel mailing list