[augeas-devel] Creating a custom lense
Dean Wilson
dean.wilson at gmail.com
Wed Apr 23 18:05:42 UTC 2008
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
More information about the augeas-devel
mailing list