[Pkg-puppet-devel] [SCM] Packaging of Facter for debian branch, upstream, updated. 3a39dd8353b6308cf49522990104cc63e55d7cda

James Turnbull james at lovedthanlost.net
Fri Jan 29 17:22:12 UTC 2010


The following commit has been merged in the upstream branch:
commit ba2e470ab5f6ee767c1b0d3016627e3838006e44
Author: James Turnbull <james at lovedthanlost.net>
Date:   Sun Mar 1 09:09:16 2009 +1100

    Fixed #2040 - Facter should provide a macosx_productversion_major fact

diff --git a/CHANGELOG b/CHANGELOG
index 502d09a..e5a5d6c 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,6 @@
 1.6.x:
+    Fixed #2040 - Facter should provide a macosx_productversion_major fact
+
     Fixed #2003 - Added is_virtual fact
 
     Fixed #2035 - Missing brace for OSX preflight
diff --git a/lib/facter/util/macosx.rb b/lib/facter/util/macosx.rb
index 6e7986e..f5f83f3 100644
--- a/lib/facter/util/macosx.rb
+++ b/lib/facter/util/macosx.rb
@@ -58,6 +58,11 @@ module Facter::Util::Macosx
         [ "productName", "productVersion", "buildVersion" ].each do |option|
             ver["macosx_#{option}"] = %x{sw_vers -#{option}}.strip
         end
+        productversion = ver["macosx_productVersion"]
+        if not productversion.nil?
+            ver["macosx_productversion_major"] = productversion.scan(/(\d+\.\d+)/)[0][0]
+            ver["macosx_productversion_minor"] = productversion.scan(/(\d+)\.(\d+)\.(\d+)/)[0].last
+        end
         ver
     end
 end

-- 
Packaging of Facter for debian



More information about the Pkg-puppet-devel mailing list