[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 0.25.5-639-g8f94f35
test branch
puppet-dev at googlegroups.com
Wed Jul 14 10:34:18 UTC 2010
The following commit has been merged in the upstream branch:
commit 54c453853ddb1648af14b42dca6f827c5cb8e007
Author: David Schmitt <david at dasz.at>
Date: Tue May 18 11:33:49 2010 +0200
Delete tempfiles on win32
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 777a067..8bc869d 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -42,9 +42,16 @@ Spec::Runner.configure do |config|
if defined?($tmpfiles)
$tmpfiles.each do |file|
- unless file.include?("/tmp") or file.include?("/var/folders")
+ file = File.expand_path(file)
+ if Puppet.features.posix? and file !~ /^\/tmp/ and file !~ /^\/var\/folders/
puts "Not deleting tmpfile #{file} outside of /tmp or /var/folders"
next
+ elsif Puppet.features.win32?
+ tempdir = File.expand_path(File.join(Dir::LOCAL_APPDATA, "Temp"))
+ if file !~ /^#{tempdir}/
+ puts "Not deleting tmpfile #{file} outside of #{tempdir}"
+ next
+ end
end
if FileTest.exist?(file)
system("chmod -R 755 '#{file}'")
--
Puppet packaging for Debian
More information about the Pkg-puppet-devel
mailing list