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. -- Writing is not necessarily something to be ashamed of, but do it in private and wash your hands afterwards. --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 -~----------~----~----~----~------~----~------~--~---
