2 May 2010 19:10
Re: Tidy question
Markus Roberts <markus <at> puppetlabs.com>
2010-05-02 17:10:21 GMT
2010-05-02 17:10:21 GMT
> > I ran into an interesting edge case when working on http://projects.reductivelabs.com/issues/2910
Definitely a bug, not a feature.
Specifically, tidy seems to require a trailing "/" on the path for directories; that is,
tidy { tidy_tmp:
path => "/tmp/",
recurse => 1,
matches => [ "jna*.tmp" ],
age => "7d",
backup => false
}works but:
tidy { tidy_tmp:
path => "/tmp",
recurse => 1,
matches => [ "jna*.tmp" ],
age => "7d",
backup => false
}doesn't. This seems wrong to me, but may serve some deeper purpose. Since the actual recursion is being done by the file serving code, I'm reluctant to just "fix" it without greater understanding of what's going on. Anyone have any insights?
It turned out that this was caused by /tmp being a symlink on a Mac, so that (according to OS X anyway) /tmp refers to the symlink and /tmp/ refers to the directory it points to (you can demonstrate this by typing "ls -l /tmp" and "ls -l /tmp/" in bash). Since tidy never follows symlinks it encounters (but will implicitly follow symlinks in the path), we get the different behaviours.
Changing this would change how tidy (and fileserving, which it delegates this functionality to) handle links they encounter deeper in the tree, which was too big of a change for a x.y.z release.
-- Markus
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To post to this group, send email to puppet-dev <at> googlegroups.com.
To unsubscribe from this group, send email to puppet-dev+unsubscribe <at> googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.
RSS Feed