On 21/03/11 2:22 PM, Daniel Pittman wrote:
On Sun, Mar 20, 2011 at 15:31, Michael Knox<[email protected]>  wrote:
On 21/03/11 5:56 AM, Daniel Pittman wrote:
Am I correct in understanding that we are writing a temporary copy for the
diff, then rewriting the change to the real file separately?

Yes

If so, could we instead use "rename" to avoid the costly parse/write cycle
being run twice per file?

Probably, my concern would be the maintenance of file permissions,
timestamps etc.
I'll have a look and see about reworking the patch to do a "rename"
I kind of assumed that Augeus would do that for us, because it makes
sense if they have a "write a new file" mode that it would by default
match the old file.  If not ... well, I guess either way would be
fine, but I wouldn't fight to have it use rename if it was more
complex. :)

Daniel
Not in the Augeas's 4 save modes, noop, newfile, backup & overwrite. I have a half written patch which does a rename of <file>.augnew exists when executing the changes, but it's beginning to look quite complex (in comparison) and ugly.

It would be neat if Augeas itself reported what was planned to be changed in noop mode, but it doesn't appear to.

Mike

--
You received this message because you are subscribed to the Google Groups "Puppet 
Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to