Issue #4872 has been updated by Nigel Kersten. Status changed from Accepted to Code Insufficient Assignee set to Kai S Target version changed from 2.6.x to 2.7.x
Kai, sorry, I should have assigned this to you. Are you able to add some tests for this? Otherwise we can try to get someone else working on the tests. ---------------------------------------- Bug #4872: Unexpected results on "replace => false" on symlinks https://projects.puppetlabs.com/issues/4872 Author: Kai S Status: Code Insufficient Priority: Normal Assignee: Kai S Category: file Target version: 2.7.x Affected Puppet version: 0.25.4 Keywords: symlink replace file Branch: When trying to use the file type on a symlink, making sure that it is initialized properly doesn't work as I would expect. Considering this recipe: file { "/home/thesymlink": ensure => "/home/idontexist", replace => false; } When I change created thesymlink to point to **something else** that doesn't exist (by hand), the next puppet run will replace thesymlink, and point it back to "/home/idontexist". If I point it at something that does exist, it works as expected. I would propose the attached patch, replacing the File.exists? test to a symlink test in puppet/type/file/target.rb: - elsif ! @resource.replace? and File.exists?(@resource[:path]) + elsif ! @resource.replace? and FileTest.symlink?(@resource[:path]) This seems to be "working" this way in most branches (0.25.4, 2.6.x). Kind regards, -- 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.
