3 Add NetBSD and update support to the pkgin provider.
5 --- lib/puppet/provider/package/pkgin.rb.orig 2013-04-07 00:25:33.000000000 +0000
6 +++ lib/puppet/provider/package/pkgin.rb
7 @@ -5,9 +5,9 @@ Puppet::Type.type(:package).provide :pkg
9 commands :pkgin => "pkgin"
11 - defaultfor :operatingsystem => :dragonfly
12 + defaultfor :operatingsystem => [:dragonfly, :netbsd]
14 - has_feature :installable, :uninstallable
15 + has_feature :installable, :uninstallable, :versionable, :upgradeable
17 def self.parse_pkgin_line(package, force_status=nil)
19 @@ -59,4 +59,20 @@ Puppet::Type.type(:package).provide :pkg
21 pkgin("-y", :remove, resource[:name])
25 + pkgin("-y", :install, resource[:name])
29 + output = pkgin("se", @resource[:name])
30 + pat = @resource[:name]
32 + if output =~ /^#{pat}-(\d\S*)\s/
35 + self.err "Could not find latest version of %s" % pat