diff options
| author | Maciej Blizinski <maciej@opencsw.org> | 2010-07-22 12:50:29 +0200 |
|---|---|---|
| committer | Maciej Blizinski <maciej@opencsw.org> | 2010-07-22 12:50:29 +0200 |
| commit | e02ba01613a5ce61ccd6c80c17d53134daf589ba (patch) | |
| tree | 03942759da0311061fe3efcadbe4a1d412382c10 /lib | |
| parent | fc1859119b8fad1edaabdbce48545e1583bfa24c (diff) | |
| download | puppet-e02ba01613a5ce61ccd6c80c17d53134daf589ba.tar.gz puppet-e02ba01613a5ce61ccd6c80c17d53134daf589ba.tar.xz puppet-e02ba01613a5ce61ccd6c80c17d53134daf589ba.zip | |
Using --single in the pkgutil provider.
Diffstat (limited to 'lib')
| -rwxr-xr-x | lib/puppet/provider/package/pkgutil.rb | 5 |
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] |
