Shouldn't there be tests for this? And shouldn't it be possible to do the change at type-creation time, so that a given type always has its name set correctly and that correct value is propagated, rather than munging the value at various times?
That being said, if this is the thing holding up 2.6.1, I'd rather ship it and fix later. On Sep 10, 2010, at 6:22 PM, Markus Roberts wrote: > This restricts the change introduced in #4691 to hostclasses, and leaves > defined > resources and nodes alone, thus more closely mimicing the 0.25.x behaviour. > It > also includes title, as this was similarly affected. > > Signed-off-by: Markus Roberts <[email protected]> > --- > lib/puppet/resource/type.rb | 9 +++++++-- > 1 files changed, 7 insertions(+), 2 deletions(-) > > diff --git a/lib/puppet/resource/type.rb b/lib/puppet/resource/type.rb > index 1d378aa..7b21e55 100644 > --- a/lib/puppet/resource/type.rb > +++ b/lib/puppet/resource/type.rb > @@ -233,8 +233,13 @@ class Puppet::Resource::Type > resource[param] = value > end > > - scope.setvar("title", resource.title) unless set.include? :title > - scope.setvar("name", resource.name.to_s.downcase) unless set.include? > :name > + if @type == :hostclass > + scope.setvar("title", resource.title.to_s.downcase) unless > set.include? :title > + scope.setvar("name", resource.name.to_s.downcase ) unless > set.include? :name > + else > + scope.setvar("title", resource.title ) unless > set.include? :title > + scope.setvar("name", resource.name ) unless > set.include? :name > + end > scope.setvar("module_name", module_name) if module_name and ! > set.include? :module_name > > if caller_name = scope.parent_module_name and ! > set.include?(:caller_module_name) > -- > 1.7.0.4 > > -- > 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. > -- Never interrupt your enemy when he is making a mistake. --Napolean Bonaparte --------------------------------------------------------------------- Luke Kanies -|- http://puppetlabs.com -|- +1(615)594-8199 -- 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.
