On Mar 10, 2009, at 5:02 PM, Oliver Hookins wrote:

>
> On Tue Mar 10, 2009 at 16:13:40 -0400, Todd Zullinger wrote:
>>
>> This allows operatingsystemrelease to properly determine the  
>> release for
>> various Red Hat based distros, including the point portion of the
>> release.
>>
>> Signed-off-by: Todd Zullinger <[email protected]>
>> ---
>> lib/facter/operatingsystemrelease.rb |    2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/lib/facter/operatingsystemrelease.rb b/lib/facter/ 
>> operatingsystemrelease.rb
>> index 2f76817..18199bd 100644
>> --- a/lib/facter/operatingsystemrelease.rb
>> +++ b/lib/facter/operatingsystemrelease.rb
>> @@ -15,7 +15,7 @@ Facter.add(:operatingsystemrelease) do
>>            line = f.readline.chomp
>>            if line =~ /\(Rawhide\)$/
>>                "Rawhide"
>> -            elsif line =~ /release (\d+)/
>> +            elsif line =~ /release (\d[\d.]*)/
>
> Ahh! That breaks the behaviour I was trying to fix by reporting the
> inconsistency. So now instead of having releases numbered 3, 4, 5  
> across the
> board it could well end up 3.8, 4.6, 5.3 etc which in my opinion is  
> much
> harder to make use of since Puppet conditionals don't support  
> substring
> matching.
>
> I'm not sure what to suggest though, but I guess there are a few
> alternatives:
> * limit $operatingsystemrelease output to only the major release  
> integer
> * allow point release output with $operatingsystemrelease, and  
> create a new
>   variable $operatingsystemmajrelease which only contains the major  
> release
>   integer
> * allow point release output with $operatingsystemrelease and add  
> substring
>   matching of variables in conditionals in puppet
>
> Your thoughts?


Stupid reality, complicating my life.

I think at this point we need to make a policy decision and stick with  
it, regardless of backward compatibility.  It's facter, and people can  
essentially avoid upgrading until their configurations are compatible,  
I guess, but consistency is more important in the long term than this  
kind of relatively small backward compatibility concern.  It can be  
fixed in configurations with a straightforward perl -pie call.

-- 
The brain is a wonderful organ. It starts working the moment you get
up in the morning and does not stop until you get into the office.
     --Robert Frost
---------------------------------------------------------------------
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to