[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 2.6.5-303-gfcfa26a

Valdis Victor Vitayaudom valdis.vitayaudom at gmail.com
Thu Mar 17 10:48:50 UTC 2011


The following commit has been merged in the upstream branch:
commit 455a89129a6860215d8e79972f720eaa7564e625
Author: Valdis Victor Vitayaudom <valdis.vitayaudom at gmail.com>
Date:   Sat Mar 5 13:36:02 2011 -0800

    (#5794) create reports directory when creating host specific directory

diff --git a/lib/puppet/reports/store.rb b/lib/puppet/reports/store.rb
index 99a9fc1..625a263 100644
--- a/lib/puppet/reports/store.rb
+++ b/lib/puppet/reports/store.rb
@@ -15,7 +15,10 @@ Puppet::Reports.register_report(:store) do
 
     dir = File.join(Puppet[:reportdir], client)
 
-    Dir.mkdir(dir, 0750) unless FileTest.exists?(dir)
+    if ! FileTest.exists?(dir)
+      FileUtils.mkdir_p(dir)
+      FileUtils.chmod_R(0750, dir)
+    end
 
     # Now store the report.
     now = Time.now.gmtime
diff --git a/spec/unit/reports/store_spec.rb b/spec/unit/reports/store_spec.rb
index 1acb5ba..9d90423 100644
--- a/spec/unit/reports/store_spec.rb
+++ b/spec/unit/reports/store_spec.rb
@@ -11,7 +11,7 @@ describe processor do
   describe "#process" do
     include PuppetSpec::Files
     before :each do
-      Puppet[:reportdir] = tmpdir('reports')
+      Puppet[:reportdir] = tmpdir('reports') << '/reports' 
       @report = YAML.load_file(File.join(PuppetSpec::FIXTURE_DIR, 'yaml/report2.6.x.yaml')).extend processor
     end
 

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list