[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:44 UTC 2011


The following commit has been merged in the experimental branch:
commit fd983410d841fec2408ded0700c841bf201eafbb
Author: Dominic Cleal <dcleal at redhat.com>
Date:   Wed Apr 13 10:34:40 2011 +0100

    (#4258) Fix fd leak opening pkgutil config files

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

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list