[augeas-devel] Augeas lens for Debian control file

David Lutterkort lutter at redhat.com
Wed Feb 24 19:37:35 UTC 2010


On Wed, 2010-02-24 at 15:18 +0100, Dominique Dumont wrote:
> Anyway, better late than never, and here's the lens I created while writing 
> the "writing a lens from bottom to top" tutorial [1]

Thanks a lot for sending this. Lens looks good to be committed.

> This lens applies to Debian control file used for Debian package creation. 
> Since this is a user's configuration file, not to a system configuration file, 
> augtool '-r' option *must* be used to set up the root directory used by 
> Augeas.

Another way to do this is to set up the transform manually, e.g.

        augtool --noautload <<EOF
        rm /augeas/load/*
        set /augeas/load/Debctrl/lens Debctrl.lns
        set /augeas/load/Debctrl/incl /path/to/control
        load
        ... do stuff ..
        EOF

With that, I wonder if it wouldn't be better to omit the 'autoload xfm'
from the lens ?

The above could be made much less painful if I added options to specify
one transform to augtool, so that you could say

        augtool --lens Debctrl.lns --incl /path/to/control

which would do the things above up to and including the load.

David





More information about the augeas-devel mailing list