[augeas-devel] Need help with logrotate lens enhancement

David Lutterkort lutter at redhat.com
Thu Oct 2 22:02:19 UTC 2008


On Thu, 2008-10-02 at 08:00 +0200, Raphaël Pinson wrote:


> You have to run augparse twice.
>  * 'augparse -I . logrotate.aug' tests the lens itself to make sure it
> doesn't generate conflicts ('-I .' is used in case your lens depends
> on local modifications of other lenses).
>  * 'augparse -I. tests/test_logrotate.aug' launches the test file for
> logrotate, using the lenses in the current directory (including the
> logrotate.aug you just tested).
> 
> Usually, I do a few more tests using the -r option, like
>  'augtool -I . -r fakeroot'
> and playing a bit with files in the fakeroot directory.

Strictly speaking, you only need to run 

        augparse -I . tests/test_logrotate.aug

since the typechecker will also check lenses in included modules (like
logrotate.aug) 

Also, adding the option '--nostdinc' is highly recommended, since it
makes sure you _only_ use modules from directories mentioned with -I;
that's important when you remove modules. The option is not available in
0.3.1 though.

All in all though, sticking to the steps that Raphael outlined is highly
recommended.

David





More information about the augeas-devel mailing list