+1 to all three patches On Mar 23, 2009, at 5:19 PM, Brice Figureau wrote:
> > Ticket #1469 introduced an incorrect change of behaviour where > recurse = 0 was considered as an infinite recursion, unlike > before. > This patch restores this behavior, and makes some test pass. > > Signed-off-by: Brice Figureau <[email protected]> > --- > lib/puppet/type/file.rb | 11 ++++++++++- > 1 files changed, 10 insertions(+), 1 deletions(-) > > diff --git a/lib/puppet/type/file.rb b/lib/puppet/type/file.rb > index 05a4b37..0cd9ebe 100644 > --- a/lib/puppet/type/file.rb > +++ b/lib/puppet/type/file.rb > @@ -128,11 +128,20 @@ module Puppet > when :remote: :remote > when Integer, Fixnum, Bignum: > self.warning "Setting recursion depth with the > recurse parameter is now deprecated, please use recurselimit" > + > + # recurse == 0 means no recursion > + return false if value == 0 > + > resource[:recurselimit] = value > true > when /^\d+$/: > self.warning "Setting recursion depth with the > recurse parameter is now deprecated, please use recurselimit" > - resource[:recurselimit] = Integer(value) > + value = Integer(value) > + > + # recurse == 0 means no recursion > + return false if value == 0 > + > + resource[:recurselimit] = value > true > else > raise ArgumentError, "Invalid recurse value %s" > % value.inspect > -- > 1.6.0.2 > > > > -- I conclude that there are two ways of constructing a software design: One way is to make it so simple that there are 'obviously' no deficiencies and the other way is to make it so complicated that there are no 'obvious' deficiencies. -- C.A.R. Hoare, Turing Lecture "The Emperor's Old Clothes" CACM February 1981, pp. 75-83. --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
