summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNigel Kersten <nigelk@google.com>2009-07-21 09:29:27 -0700
committerNigel Kersten <nigelk@google.com>2009-07-21 09:29:27 -0700
commitc383ceb282d018b6d8ec348628353a2e3363da3b (patch)
tree97690e590973fa93997a1a4f7317f98427fbabb9
parent98599c4a8d11cad4ecc11ee813a8c33a6aa9e5bb (diff)
downloadpuppet-c383ceb282d018b6d8ec348628353a2e3363da3b.tar.gz
puppet-c383ceb282d018b6d8ec348628353a2e3363da3b.tar.xz
puppet-c383ceb282d018b6d8ec348628353a2e3363da3b.zip
Make pkgdmg default Darwin provider, make confines consistent on Darwin package providers.
-rw-r--r--lib/puppet/provider/package/appdmg.rb3
-rwxr-xr-xlib/puppet/provider/package/apple.rb4
-rwxr-xr-xlib/puppet/provider/package/darwinport.rb2
-rw-r--r--lib/puppet/provider/package/pkgdmg.rb5
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"