Issue #3162 has been updated by Stig Sandbeck Mathisen.
File issue.3162.diff added
Attached is a tiny patch to fix this.
Result after patching, without size flag:
<pre>
$ (touch /tmp/test_tidy/zero; echo foo > /tmp/test_tidy/foo )
$ puppet -e 'tidy { "/tmp/test_tidy": recurse => true; }'
notice: //Tidy[/tmp/test_tidy]: Tidying File[/tmp/test_tidy/zero]
notice: //Tidy[/tmp/test_tidy]: Tidying File[/tmp/test_tidy/foo]
notice: /File[/tmp/test_tidy/zero]/ensure: removed
notice: /File[/tmp/test_tidy/foo]/ensure: removed
</pre>
Result after patching, with size flag
<pre>
$ (touch /tmp/test_tidy/zero; echo foo > /tmp/test_tidy/foo )
$ puppet -e 'tidy { "/tmp/test_tidy": size => "0", recurse => true; }'
notice: //Tidy[/tmp/test_tidy]: Tidying File[/tmp/test_tidy/zero]
notice: //Tidy[/tmp/test_tidy]: Tidying File[/tmp/test_tidy/foo]
notice: /File[/tmp/test_tidy/zero]/ensure: removed
notice: /File[/tmp/test_tidy/foo]/ensure: removed
<pre>
----------------------------------------
Bug #3162: tidy does not remove empty files when "size => 0" is set
http://projects.reductivelabs.com/issues/3162
Author: Stig Sandbeck Mathisen
Status: Unreviewed
Priority: Normal
Assigned to:
Category:
Target version:
Affected version: 0.25.4
Keywords: tidy
Branch:
When using the "tidy" type, empty files are not removed when "size => 0" is
used.
puppetdoc says "Tidy files whose size is equal to or greater than the specified
size.", so this is not the expected behavior.
With size parameter
<pre>
$ ( touch /tmp/test_tidy/zero; echo foo > /tmp/test_tidy/foo )
$ puppet -e 'tidy { "/tmp/test_tidy": size => "0", recurse => true; }'
notice: //Tidy[/tmp/test_tidy]: Tidying File[/tmp/test_tidy/foo]
notice: /File[/tmp/test_tidy/foo]/ensure: removed
</pre>
Without size parameter
<pre>
$ ( touch /tmp/test_tidy/zero; echo foo > /tmp/test_tidy/foo )
$ puppet -e 'tidy { "/tmp/test_tidy": recurse => true; }'
notice: //Tidy[/tmp/test_tidy]: Tidying File[/tmp/test_tidy/zero]
notice: //Tidy[/tmp/test_tidy]: Tidying File[/tmp/test_tidy/foo]
notice: /File[/tmp/test_tidy/zero]/ensure: removed
notice: /File[/tmp/test_tidy/foo]/ensure: removed
</pre>
See also the "original report":http://bugs.debian.org/513309 in the Debian BTS.
--
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.