Issue #2675 has been updated by Jeroen Meeuwen.

Markus Roberts wrote:
> I'm unclear on what that patch is supposed to accomplish; it appears that it 
> would simply reintroduce the bug, by making "/some/path/" and "/some/path" be 
> internally distinct when they are not supposed to be.

The former solution provided to the problem as you state it though, is not 
allowing to use a trailing slash in a directory path at all. Usually though, 
directory paths *do* have a trailing slash (documentation, even freaking tab 
completion, etc. and thus why not puppet manifests also)?

The use of this trailing slash is to be able to significantly distinct between 
a file and a directory path when using dependencies; the 'require => 
File["/some/path/"]' may be somewhere other then the 'file { "/some/path/": 
ensure => directory }'.

I'd say that reintroducing the original "bug" where File["/some/path/"] and 
File["/some/path"] are not the same while they should be, is irrelevant if you 
consider the solution provided in 0.25.x is eliminating the possibility to 
conform to very common standards, and therefore actually preventing stuff from 
happening.
----------------------------------------
Bug #2675: File path comparisons sensitive to trailing slashes
http://projects.reductivelabs.com/issues/2675

Author: Marc Fournier
Status: Needs more information
Priority: Low
Assigned to: 
Category: file
Target version: 0.25.3
Affected version: 0.25.1rc2
Keywords: 
Branch: http://github.com/jes5199/puppet/tree/ticket/0.25.x/2675


I just noticed this error on 0.25.x. It used to work on 0.24.8.

<pre>
$ cat /tmp/test1.pp
file { "/tmp/dir1":       ensure => directory }
file { "/tmp/dir1/file1": ensure => present, require => File["/tmp/dir1"] }

$ cat /tmp/test2.pp
file { "/tmp/dir2/":      ensure => directory }
file { "/tmp/dir2/file2": ensure => present, require => File["/tmp/dir2"] }

$ cat /tmp/test3.pp
file { "/tmp/dir3/":      ensure => directory }
file { "/tmp/dir3/file3": ensure => present, require => File["/tmp/dir3/"] }

$ puppet /tmp/test1.pp
notice: //File[/tmp/dir1]/ensure: created
notice: //File[/tmp/dir1/file1]/ensure: created

$ puppet /tmp/test2.pp
notice: //File[/tmp/dir2]/ensure: created
notice: //File[/tmp/dir2/file2]/ensure: created

$ puppet /tmp/test3.pp
Could not find dependency File[/tmp/dir3/] for File[/tmp/dir3/file3] at 
/tmp/test3.pp:2
</pre>

I think I have a working patch. I'll submit it in a few minutes.


-- 
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://reductivelabs.com/redmine/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