[augeas-devel] Merging Configuration Status

Christos Bountalis c.bountalis at gmail.com
Thu Jun 9 21:14:21 UTC 2011


Hello,

First of all i wanted to share with you my first ever patch, not just 
for Augeas but in general too. This patch includes aug_find_lense a 
function to find which lense was used for loading the specific file 
given as a parameter (path) to augeas.

The augtool will have a command merge, I have done basic things on it 
thought and it is not ready yet to show it. The command will work like this

merge destination merging-parameters files-to-be-merged

example:
merge /etc/hosts/ (merging-parameters) /tmp/myfile1 /tmp/myfile2 ..... 
/tmp/myfile3

By using the aug_find lense we can locate the lense used for the 
destination file and then we can continue, and use it to load the 
files-to-merged to augeas. Then after having them as a tree too there 
will be a method aug_process_tree that will try to match the destination 
with the files-to-be-merged, and will then call the right function 
according to merging-parameters if a match is found.

The aug_process_tree function will be like

  int aug_process_trees(struct augeas *aug, const char *dest, void (*process)(struct augeas *aug, const char *first, const char *second, void* data), void* data,const char *sources,...);

Anyway this is just a small report, on the things i am working. Feedback is more than welcome.

Regards,
Christos


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Added-aug_find_lense-function-to-find-and-return-use.patch
Type: text/x-patch
Size: 2513 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/augeas-devel/attachments/20110610/a20d43b4/attachment.bin>


More information about the augeas-devel mailing list