+1 I'm looking forward to a cleaner solution for 2.7.x On Mon, Sep 27, 2010 at 3:25 PM, Nick Lewis <[email protected]> wrote:
> Whits are inserted into the dependency graph in the place where an empty > class is being required. Unfortunately, when such a class is involved in > a loop, the error message shows the cycle as involving Whit[Classname]. > This patch changes it to say Class[Classname], which is much easier to > understand. It also fixes puppetdoc from generating documentation on the > Whit type. > > Signed-off-by: Nick Lewis <[email protected]> > --- > lib/puppet/reference/type.rb | 1 + > lib/puppet/type/whit.rb | 4 ++++ > 2 files changed, 5 insertions(+), 0 deletions(-) > > diff --git a/lib/puppet/reference/type.rb b/lib/puppet/reference/type.rb > index 847bbc2..b423387 100644 > --- a/lib/puppet/reference/type.rb > +++ b/lib/puppet/reference/type.rb > @@ -5,6 +5,7 @@ type = Puppet::Util::Reference.newreference :type, :doc => > "All Puppet resource > Puppet::Type.eachtype { |type| > next if type.name == :puppet > next if type.name == :component > + next if type.name == :whit > types[type.name] = type > } > > diff --git a/lib/puppet/type/whit.rb b/lib/puppet/type/whit.rb > index 6e5ba9e..55bfcfb 100644 > --- a/lib/puppet/type/whit.rb > +++ b/lib/puppet/type/whit.rb > @@ -4,4 +4,8 @@ Puppet::Type.newtype(:whit) do > newparam :name do > desc "The name of the whit, because it must have one." > end > + > + def to_s > + "Class[#{name}]" > + end > end > -- > 1.7.2.3 > > -- > 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]<puppet-dev%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/puppet-dev?hl=en. > > -- 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.
