[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, experimental, updated. debian/2.6.8-1-844-g7ec39d5

Dominic Cleal dcleal at redhat.com
Tue May 10 08:13:43 UTC 2011


The following commit has been merged in the experimental branch:
commit 7726dc3f7d9fa45e94e748fe5679e89d96dd817f
Author: Dominic Cleal <dcleal at redhat.com>
Date:   Wed Apr 13 09:50:41 2011 +0100

    (#4258) Permit variations of -nv in both pkgutil.conf files

diff --git a/lib/puppet/provider/package/pkgutil.rb b/lib/puppet/provider/package/pkgutil.rb
index 760ce01..2661ced 100755
--- a/lib/puppet/provider/package/pkgutil.rb
+++ b/lib/puppet/provider/package/pkgutil.rb
@@ -21,9 +21,11 @@ Puppet::Type.type(:package).provide :pkgutil, :parent => :sun, :source => :sun d
       Puppet.notice "See /var/opt/csw/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/ }
+    [ "/opt/csw/etc/pkgutil.conf", "/etc/opt/csw/pkgutil.conf" ].each do |confpath|
+      pkgutilconf = File.open(confpath)
+      pkgutilconf.each {|line| correct_wgetopts = true if line =~ /^\s*wgetopts\s*=.*(-nv|-q|--no-verbose|--quiet)/ }
+    end
     if ! correct_wgetopts
       Puppet.notice "It is highly recommended that you set 'wgetopts=-nv' in your pkgutil.conf."
     end

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list