Please review pull request #148: (maint) revert temp dir changes opened by (justinstoller)
Description:
Previous changes to the tempdir and tempfile methods on hosts namespaced they created into a /tmp/puppet-acceptance directory.
This caused issues with whether or not the directories were created yet. Reverting for now.
- Opened: Sun Feb 19 03:16:38 UTC 2012
- Based on: puppetlabs:master (f335b81a5306c942a7f51b3b62ca734f8886e00e)
- Requested merge: justinstoller:revert/master/quarantine-tempfiles (f069fbd4450d96099a4f9e051497ff3be8bd553f)
Diff follows:
diff --git a/lib/host/unix/file.rb b/lib/host/unix/file.rb
index 36a30d5..b94094a 100644
--- a/lib/host/unix/file.rb
+++ b/lib/host/unix/file.rb
@@ -2,35 +2,15 @@ module Unix::File
include CommandFactory
def tmpfile(name)
- execute("mktemp --tmpdir=#{base_tmpdir} -t #{name}.XXXXXX")
+ execute("mktemp -t #{name}.XXXXXX")
end
def tmpdir(name)
- execute("mktemp --tmpdir=#{base_tmpdir} -td #{name}.XXXXXX")
+ execute("mktemp -td #{name}.XXXXXX")
end
def path_split(paths)
paths.split(':')
end
-
-
- # private utility method to get the base temp dir path; the goal here is to quarantine acceptance test temp files into
- # one easily-identifiable directory that can be cleaned up easily
- def base_tmpdir()
- unless @base_tmp_dir then
- @base_tmp_dir = "#{get_system_tmpdir}/puppet-acceptance"
- mkdirs(@base_tmp_dir)
- end
- @base_tmp_dir
- end
- private :base_tmpdir
-
- # private utility method for determining the system tempdir
- def get_system_tmpdir()
- # hard-coded for now, but this could execute a command on the system to check environment variables, etc.
- "/tmp"
- end
- private :get_system_tmpdir
-
end
diff --git a/lib/host/windows/file.rb b/lib/host/windows/file.rb
index d66af72..60b7d3d 100644
--- a/lib/host/windows/file.rb
+++ b/lib/host/windows/file.rb
@@ -2,32 +2,14 @@ module Windows::File
include CommandFactory
def tmpfile(name)
- execute("cygpath -m $(mktemp --tmpdir=#{base_tmpdir} -t #{name}.XXXXXX)")
+ execute("cygpath -m $(mktemp -t #{name}.XXXXXX)")
end
def tmpdir(name)
- execute("cygpath -m $(mktemp --tmpdir=#{base_tmpdir} -td #{name}.XXXXXX)")
+ execute("cygpath -m $(mktemp -td #{name}.XXXXXX)")
end
def path_split(paths)
paths.split(';')
end
-
- # private utility method to get the base temp dir path; the goal here is to quarantine acceptance test temp files into
- # one easily-identifiable directory that can be cleaned up easily
- def base_tmpdir()
- unless @base_tmp_dir then
- @base_tmp_dir = "#{get_system_tmpdir}/puppet-acceptance"
- mkdirs(@base_tmp_dir)
- end
- @base_tmp_dir
- end
- private :base_tmpdir
-
- # private utility method for determining the system tempdir
- def get_system_tmpdir()
- # hard-coded for now, but this could execute a command on the system to check environment variables, etc.
- "/tmp"
- end
- private :get_system_tmpdir
end
-- You received this message because you are subscribed to the Google Groups "Puppet Developers" 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-dev?hl=en.
