Issue #11988 has been updated by David  Lutterkort.

Even if you need to make changes between two calls to @aug.save, you should 
keep the handle open and call @aug.load to reset the tree to its pristine 
state. @aug.load goes through great length to not reload files unnecessarily 
(if the mtime of a file hasn't changed since the last load, and nothing in the 
corresponding tree was touched, @aug.load is a noop, i.e. for unchanged file 
all that happens is a stat)

In addition, the tree should be initialized with as few files as possible; 
IIRC, Dominic wrote some clever code to deduce from the context which file 
needs to be loaded.
----------------------------------------
Bug #11988: Augeas provider can clobber symlinks
https://projects.puppetlabs.com/issues/11988

Author: Nathan Huff
Status: Accepted
Priority: Normal
Assignee: 
Category: augeas
Target version: 2.7.x
Affected Puppet version: 2.7.9
Keywords: augeas
Branch: 


If the augeas resource is fed a symlink as the target file and it
makes changes it will overwrite it with a regular file.  It creates
and .augnew file and just blindly moves it into place without checking
if the target file was a symlink.

The provider should either check whether the target was a symlink and 
dereference it or it should rerun augeas in overwrite mode since augeas does
take care to dereference if necessary. 


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" 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-bugs?hl=en.

Reply via email to