On Jul 27, 2009, at 8:05 AM, Nigel Kersten wrote:

>
> On Sun, Jul 26, 2009 at 9:05 PM, Luke Kanies<[email protected]> wrote:
>>
>> On Jul 26, 2009, at 8:41 AM, Nigel Kersten wrote:
>>
>>>
>>> On Sun, Jul 26, 2009 at 8:33 AM, Brice
>>> Figureau<[email protected]> wrote:
>>>>
>>>> On 23/07/09 18:02, Nigel Kersten wrote:
>>>>> Signed-off-by: Nigel Kersten <[email protected]>
>>>>> ---
>>>>>  .../provider/nameservice/directoryservice.rb       |   36 ++++++ 
>>>>> ++
>>>>> +-----------
>>>>>  1 files changed, 16 insertions(+), 20 deletions(-)
>>>>>
>>>>> diff --git a/lib/puppet/provider/nameservice/directoryservice.rb  
>>>>> b/
>>>>> lib/puppet/provider/nameservice/directoryservice.rb
>>>>> index 9daed17..f4c9d59 100644
>>>>> --- a/lib/puppet/provider/nameservice/directoryservice.rb
>>>>> +++ b/lib/puppet/provider/nameservice/directoryservice.rb
>>>>> @@ -108,18 +108,14 @@ class DirectoryService <
>>>>> Puppet::Provider::NameService
>>>>>              return @macosx_version_major
>>>>>          end
>>>>>          begin
>>>>> -            product_version =  
>>>>> Facter.value(:macosx_productversion)
>>>>> -            if product_version.nil?
>>>>> -                raise Puppet::Error, "Could not determine OS X
>>>>> version from Facter"
>>>>> -            end
>>>>> -            product_version_major = product_version.scan(/(\d+)\.
>>>>> (\d+)./).join(".")
>>>>> +            product_version_major =
>>>>> Facter.value(:macosx_productversion_major)
>>>>
>>>> My Facter (version 1.5) doesn't have this fact (but has
>>>> macosx_productversion).
>>>>
>>>> Could it be possible to have a degraded mode, as right now I get
>>>> tons of
>>>> failing (old) tests?
>>>>
>>>> I know I should upgrade (and will), but supporting (not so) older
>>>> versions of Facter should be great, or at least produce a warning
>>>> saying
>>>> that I should upgrade.
>>>
>>> We need to pick a minimum Facter version for 0.25.0 compatibility.
>>>
>>> The reason I made this patch was because we had a bug in the Facter
>>> code that essentially did the same thing, and fixing it in two
>>> separate spots seems silly...
>>>
>>> We've been doing this in install.rb, and I feel like that is the
>>> correct place to check the Facter version.  We should patch that  
>>> when
>>> we've decided what the minimum Facter version for 0.25.0 is.
>>>
>>> It's the job of the packagers for various distros to ensure that
>>> external dependencies are correct imho, and it seems like a waste of
>>> effort to go through working out degraded modes for all the  
>>> different
>>> Facter features to me....
>>
>
>> I think that, at the least, it's reasonable to produce an upgrade
>> notice or something.  Just having a failure because someone hasn't
>> upgraded isn't very good.  Plenty of people use hand-rolled packages,
>> or git, or tarballs.
>>
>> If it's reasonable to support the old version but produce a
>> deprecation notice, that would be best.
>
> So I have a couple of options for the actual provider, and am happy to
> take direction on any of them:
>
> a) continue to duplicate the Facter code for major version inside the
> provider without a Facter version warning.
> b) continue to duplicate the Facter code for major version inside the
> provider with a Facter version warning.
> c) Fail with a deprecation warning if the Facter version is below
> whatever version first provided this fact.
>
> I still think we should be specifying a minimum Facter version for
> Puppet 0.25.x somewhere, whether it be in the install.rb script, or in
> the Puppet code, or both.
>
> Whichever approach people are happy with, I'll make the tests do the
> same thing I guess.

I would prefer option b here.  I agree on specifying a minimum  
version; you willing to also provide a patch to install.rb that checks  
the version?

-- 
A motion to adjourn is always in order. --Robert Heinlein
---------------------------------------------------------------------
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