[augeas-devel] RFC: Augeas version api?

Bryan Kearney bkearney at redhat.com
Mon Jan 19 20:00:04 UTC 2009


David Lutterkort wrote:
> On Sun, 2009-01-18 at 17:45 -0500, Bryan Kearney wrote:
>> David Lutterkort wrote:
>>> On Fri, 2009-01-16 at 10:48 -0500, Bryan Kearney wrote:
>>>> Just thinking ahead, with new features being added it may be nice to 
>>>> check the verison before executing them. What would you all think of 
>>>> either a aug_version() call on the augeas object which reads from 
>>>> /augeas/version?
>>>>
>>>> This would allow you to check from within the tree, or the api directly, 
>>>> and do branch processing.
>>> That would be easy enough to do (probably one or two lines in aug_init)
>>> - though I suspect version info isn't _really_ what you're after, but a
>>> more finegrained way to inquire about 'features', such as whether noop
>>> mode for save is supported, right ?
>> Yes, to be fair, my use case is what you said. Version was my proxy for 
>> getting the information.
> 
> I just committed a patch that sets up a tree /augeas/version that gives
> you the current version and lists all the legal save modes. We can
> easily add to this if you need to test for any other features:
> 
>         augtool> print /augeas/version/
>         /augeas/version = "0.3.5"
>         /augeas/version/save
>         /augeas/version/save/mode[1] = "backup"
>         /augeas/version/save/mode[2] = "newfile"
>         /augeas/version/save/mode[3] = "noop"
>         /augeas/version/save/mode[4] = "overwrite"

Great.. thanks. When you get a chance, if I could requst a 0.3.6 cut 
with the current head, that would be great. I can work on this verison 
so I am not blocked by anything... so no major rush.

-- bk




More information about the augeas-devel mailing list