[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. puppet-0.24.5-rc3-1601-gf8c1b08

James Turnbull james at lovedthanlost.net
Fri Jan 15 09:07:28 UTC 2010


The following commit has been merged in the upstream branch:
commit f5dd6c888a5e5011d2dac074373984604506ab12
Author: Brice Figureau <brice-puppet at daysofwonder.com>
Date:   Mon Nov 23 22:34:52 2009 +0100

    Fix #2831 - puppetdoc doesn't cope with regex node
    
    The problem is that regex node contains '/' which is a directory
    separator on unix.
    Since puppetdoc writes a file for each node this was creating empty
    directories and documentation for such node couldn't be stored.
    This patch removes the slashes in the node names.
    
    Signed-off-by: Brice Figureau <brice-puppet at daysofwonder.com>

diff --git a/lib/puppet/util/rdoc/generators/puppet_generator.rb b/lib/puppet/util/rdoc/generators/puppet_generator.rb
index bf2609f..58c0aca 100644
--- a/lib/puppet/util/rdoc/generators/puppet_generator.rb
+++ b/lib/puppet/util/rdoc/generators/puppet_generator.rb
@@ -1,5 +1,7 @@
 require 'rdoc/generators/html_generator'
 require 'puppet/util/rdoc/code_objects'
+require 'digest/md5'
+
 module Generators
 
     # This module holds all the classes needed to generate the HTML documentation
@@ -335,7 +337,7 @@ module Generators
             resources.each do |r|
                 res << {
                   "name" => CGI.escapeHTML(r.name),
-                  "aref" => "#{path_prefix}\##{r.aref}"
+                  "aref" => CGI.escape(path_prefix)+"\#"+CGI.escape(r.aref)
                 }
             end
             res
@@ -414,7 +416,7 @@ module Generators
             if path['<<']
                 path.gsub!(/<<\s*(\w*)/) { "from-#$1" }
             end
-            File.join(prefix, path.split("::")) + ".html"
+            File.join(prefix, path.split("::").collect { |p| Digest::MD5.hexdigest(p) }) + ".html"
         end
 
         def parent_name
@@ -508,7 +510,7 @@ module Generators
             h_name = CGI.escapeHTML(name)
 
             @values["classmod"]  = "Node"
-            @values["title"]     = "#{@values['classmod']}: #{h_name}"
+            @values["title"]     = CGI.escapeHTML("#{@values['classmod']}: #{h_name}")
 
             c = @context
             c = c.parent while c and !c.diagram

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list