diff options
author | Nigel Kersten <nigelk@google.com> | 2009-07-21 09:29:27 -0700 |
---|---|---|
committer | Nigel Kersten <nigelk@google.com> | 2009-07-21 09:29:27 -0700 |
commit | c383ceb282d018b6d8ec348628353a2e3363da3b (patch) | |
tree | 97690e590973fa93997a1a4f7317f98427fbabb9 /lib/puppet | |
parent | 98599c4a8d11cad4ecc11ee813a8c33a6aa9e5bb (diff) | |
download | puppet-c383ceb282d018b6d8ec348628353a2e3363da3b.tar.gz puppet-c383ceb282d018b6d8ec348628353a2e3363da3b.tar.xz puppet-c383ceb282d018b6d8ec348628353a2e3363da3b.zip |
Make pkgdmg default Darwin provider, make confines consistent on Darwin package providers.
Diffstat (limited to 'lib/puppet')
-rw-r--r-- | lib/puppet/provider/package/appdmg.rb | 3 | ||||
-rwxr-xr-x | lib/puppet/provider/package/apple.rb | 4 | ||||
-rwxr-xr-x | lib/puppet/provider/package/darwinport.rb | 2 | ||||
-rw-r--r-- | lib/puppet/provider/package/pkgdmg.rb | 5 |
4 files changed, 7 insertions, 7 deletions
diff --git a/lib/puppet/provider/package/appdmg.rb b/lib/puppet/provider/package/appdmg.rb index 5d64effac..352f8738f 100644 --- a/lib/puppet/provider/package/appdmg.rb +++ b/lib/puppet/provider/package/appdmg.rb @@ -16,7 +16,8 @@ require 'puppet/provider/package' Puppet::Type.type(:package).provide(:appdmg, :parent => Puppet::Provider::Package) do desc "Package management which copies application bundles to a target." - confine :exists => "/Library/Receipts" + confine :operatingsystem => :darwin + commands :hdiutil => "/usr/bin/hdiutil" commands :curl => "/usr/bin/curl" commands :ditto => "/usr/bin/ditto" diff --git a/lib/puppet/provider/package/apple.rb b/lib/puppet/provider/package/apple.rb index b211b7e12..063470fc4 100755 --- a/lib/puppet/provider/package/apple.rb +++ b/lib/puppet/provider/package/apple.rb @@ -8,11 +8,9 @@ Puppet::Type.type(:package).provide :apple, :parent => Puppet::Provider::Package automatically add the ``.pkg`` extension, so leave that off when specifying the package name." - confine :exists => "/Library/Receipts" + confine :operatingsystem => :darwin commands :installer => "/usr/sbin/installer" - defaultfor :operatingsystem => :darwin - def self.instances instance_by_name.collect do |name| self.new( diff --git a/lib/puppet/provider/package/darwinport.rb b/lib/puppet/provider/package/darwinport.rb index 73d5f395d..7829438c5 100755 --- a/lib/puppet/provider/package/darwinport.rb +++ b/lib/puppet/provider/package/darwinport.rb @@ -3,8 +3,8 @@ require 'puppet/provider/package' Puppet::Type.type(:package).provide :darwinport, :parent => Puppet::Provider::Package do desc "Package management using DarwinPorts on OS X." + confine :operatingsystem => :darwin commands :port => "/opt/local/bin/port" - confine :operatingsystem => "Darwin" def self.eachpkgashash # list out all of the packages diff --git a/lib/puppet/provider/package/pkgdmg.rb b/lib/puppet/provider/package/pkgdmg.rb index 8f11a0aa3..8a916d5c4 100644 --- a/lib/puppet/provider/package/pkgdmg.rb +++ b/lib/puppet/provider/package/pkgdmg.rb @@ -30,8 +30,9 @@ require 'facter/util/plist' Puppet::Type.type(:package).provide :pkgdmg, :parent => Puppet::Provider::Package do desc "Package management based on Apple's Installer.app and DiskUtility.app. This package works by checking the contents of a DMG image for Apple pkg or mpkg files. Any number of pkg or mpkg files may exist in the root directory of the DMG file system. Sub directories are not checked for packages. See `the wiki docs </trac/puppet/wiki/DmgPackages>` for more detail." - - confine :exists => "/Library/Receipts" + + confine :operatingsystem => :darwin + defaultfor :operatingsystem => :darwin commands :installer => "/usr/sbin/installer" commands :hdiutil => "/usr/bin/hdiutil" commands :curl => "/usr/bin/curl" |