[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, experimental, updated. debian/2.6.8-1-844-g7ec39d5

Max Martin max at puppetlabs.com
Tue May 10 08:05:57 UTC 2011


The following commit has been merged in the experimental branch:
commit 2a915725adf0ccefcc28653cbba2219925194594
Author: Matt Robinson <matt at puppetlabs.com>
Date:   Mon Mar 7 17:51:09 2011 -0800

    (#4798) Make rdoc work if moduledir & manifestdir overlap
    
    Merging 2.6.next into next caused a regression; this commit fixes that
    regression.
    
    Paired-with:Max Martin <max at puppetlabs.com>

diff --git a/lib/puppet/util/rdoc.rb b/lib/puppet/util/rdoc.rb
index 16d1fa1..c00bc6f 100644
--- a/lib/puppet/util/rdoc.rb
+++ b/lib/puppet/util/rdoc.rb
@@ -31,6 +31,7 @@ module Puppet::Util::RDoc
       options << "--force-update" if Options::OptionList.options.any? { |o| o[0] == "--force-update" }
       options += [ "--charset", charset] if charset
       options += files
+      #TODO dedup file paths (not strict duplication sense, parents, children, etc
 
       # launch the documentation process
       r.document(options)
diff --git a/lib/puppet/util/rdoc/parser.rb b/lib/puppet/util/rdoc/parser.rb
index 2b89baa..0f746e2 100644
--- a/lib/puppet/util/rdoc/parser.rb
+++ b/lib/puppet/util/rdoc/parser.rb
@@ -34,17 +34,18 @@ class Parser
   # main entry point
   def scan
     environment = Puppet::Node::Environment.new
+    @known_resource_types = environment.known_resource_types
     unless environment.known_resource_types.watching_file?(@input_file_name)
       Puppet.info "rdoc: scanning #{@input_file_name}"
       if @input_file_name =~ /\.pp$/
         @parser = Puppet::Parser::Parser.new(environment)
         @parser.file = @input_file_name
-        @known_resource_types = environment.known_resource_types
         @parser.parse.instantiate('').each do |type|
           @known_resource_types.add type
         end
       end
     end
+
     scan_top_level(@top_level)
     @top_level
   end
@@ -342,6 +343,7 @@ class Parser
   # that contains the documentation
   def parse_elements(container)
     Puppet.debug "rdoc: scanning manifest"
+
     @known_resource_types.hostclasses.values.sort { |a,b| a.name <=> b.name }.each do |klass|
       name = klass.name
       if klass.file == @input_file_name
diff --git a/spec/integration/application/doc_spec.rb b/spec/integration/application/doc_spec.rb
index d94b304..f0b9d7d 100644
--- a/spec/integration/application/doc_spec.rb
+++ b/spec/integration/application/doc_spec.rb
@@ -7,7 +7,6 @@ describe Puppet::Application::Doc do
   include PuppetSpec::Files
 
   it "should not generate an error when module dir overlaps parent of site.pp (#4798)" do
-    pending "need to fix as part of fixing Brice's rdoc patch"
     begin
       # Note: the directory structure below is more complex than it
       # needs to be, but it's representative of the directory structure

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list