[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, upstream, updated. 0.25.5-639-g8f94f35

Markus Roberts Markus at reality.com
Wed Jul 14 10:36:38 UTC 2010


The following commit has been merged in the upstream branch:
commit 5f8a2424bcd4f78e71963060b375e12167c7bbef
Author: Markus Roberts <Markus at reality.com>
Date:   Wed Jul 7 07:37:12 2010 -0700

    Fix for #4120 No namevar running puppet doc -r type
    
    Reworked it to use the new key_attributes instead.

diff --git a/lib/puppet/reference/type.rb b/lib/puppet/reference/type.rb
index 6f8d480..335f4a4 100644
--- a/lib/puppet/reference/type.rb
+++ b/lib/puppet/reference/type.rb
@@ -103,11 +103,11 @@ Resource Types
             docs[name] = scrub(type.paramdoc(name))
         }
 
+        additional_key_attributes = type.key_attributes - [:name]
         docs.sort { |a, b|
             a[0].to_s <=> b[0].to_s
         }.each { |name, doc|
-            namevar = type.namevar == name and name != :name
-            str += paramwrap(name, doc, :namevar => namevar)
+            str += paramwrap(name, doc, :namevar => additional_key_attributes.include?(name))
         }
         str += "\n"
     }

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list