[augeas-devel] RFC: Augeas Check function
Bryan Kearney
bkearney at redhat.com
Mon Jan 12 18:59:31 UTC 2009
David Lutterkort wrote:
> On Fri, 2009-01-09 at 13:34 -0500, Bryan Kearney wrote:
>
> I've been meaning to change that so that you can do something like
> set /augeas/save overwrite
> save
> .. more changes to the tree ..
> set /augeas/save backup
> save
> so that the first batch of changes just overwrites existing files, and
> the second also saves .augsave files.
>
> With that model, we'd add another option for /augeas/save, say 'check'
> or 'none' and do what your aug_check call does. With that, we wouldn't
> need to add another API call, and the implementation would just be a few
> additional lines in aug_save and tree_save.
>
> What do you think about approaching it that way ?
>
> David
David:
Please take a look at this branch:
http://github.com/bkearney/augeas/tree/flags
It implements the feature mostly per our discussion. Couple of things:
1) I made noop into a first class flag, as it seemed odd to have part of
the flag->text public and the other half not.
2) in aug_save the logic causes some of the initial flag values to be
lost. Since some of the flags effect saving and some do not, the
"correct" way would be to toggle on the bits which effect saving or to
split out the flags into save versus init. I figured you would not want
to do the latter.. and I would hold off on the former to make sure this
approach passed muster.
-- bk
More information about the augeas-devel
mailing list