summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMaciej Blizinski <maciej@opencsw.org>2010-07-22 12:50:29 +0200
committerMaciej Blizinski <maciej@opencsw.org>2010-07-22 12:50:29 +0200
commite02ba01613a5ce61ccd6c80c17d53134daf589ba (patch)
tree03942759da0311061fe3efcadbe4a1d412382c10 /lib
parentfc1859119b8fad1edaabdbce48545e1583bfa24c (diff)
downloadpuppet-e02ba01613a5ce61ccd6c80c17d53134daf589ba.tar.gz
puppet-e02ba01613a5ce61ccd6c80c17d53134daf589ba.tar.xz
puppet-e02ba01613a5ce61ccd6c80c17d53134daf589ba.zip
Using --single in the pkgutil provider.
Diffstat (limited to 'lib')
-rwxr-xr-xlib/puppet/provider/package/pkgutil.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/puppet/provider/package/pkgutil.rb b/lib/puppet/provider/package/pkgutil.rb
index cde7482f2..c2489ccad 100755
--- a/lib/puppet/provider/package/pkgutil.rb
+++ b/lib/puppet/provider/package/pkgutil.rb
@@ -1,4 +1,5 @@
# Packaging using pkgutil from http://pkgutil.wikidot.com/
+# vim:set sw=4 ts=4 sts=4:
Puppet::Type.type(:package).provide :pkgutil, :parent => :sun, :source => :sun do
desc "Package management using ``pkgutil`` command on Solaris."
pkgutil = "pkgutil"
@@ -20,6 +21,7 @@ Puppet::Type.type(:package).provide :pkgutil, :parent => :sun, :source => :sun d
end
end
+ # It's a class method. Returns a list of instances of this class.
def self.instances(hash = {})
blastlist(hash).collect do |bhash|
bhash.delete(:avail)
@@ -32,6 +34,7 @@ Puppet::Type.type(:package).provide :pkgutil, :parent => :sun, :source => :sun d
command = ["-c"]
if hash[:justme]
+ command << ["--single"]
command << hash[:justme]
end
@@ -86,7 +89,7 @@ Puppet::Type.type(:package).provide :pkgutil, :parent => :sun, :source => :sun d
pkgutil "-y", "--install", @resource[:name]
end
- # Retrieve the version from the current package file.
+ # What's the latest version of the package available?
def latest
hash = self.class.blastlist(:justme => @resource[:name])
hash[:avail]