This patch adds a check to the pkgutil provider to make sure the wget options 
(in pkgutil.conf) include -nv to give us the optimal level of verbosity from 
wget.

I've merged Dominic Cleal's latest changes before working on this patch.
https://github.com/gw42/puppet/tree/tickets/master/4258-dev


--- a/lib/puppet/provider/package/pkgutil.rb
+++ b/lib/puppet/provider/package/pkgutil.rb
@@ -6,6 +6,13 @@ Puppet::Type.type(:package).provide :pkgutil, :parent => :sun, 
:source => :sun d
     pkguti = "/opt/csw/bin/pkgutil"
   end
 
+  pkgutilconf = File.open("/etc/opt/csw/pkgutil.conf")
+  correct_wgetopts = false
+  pkgutilconf.each {|line| correct_wgetopts = true if line =~ 
/^\s*wgetopts\s*=.*-nv/ }
+  if ! correct_wgetopts
+    Puppet.notice "It is highly recommended that you set 'wgetopts=-nv' in 
your pkgutil.conf."
+  end
+
   confine :operatingsystem => :solaris
 
   commands :pkguti => pkguti

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to