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


The following commit has been merged in the experimental branch:
commit 9d63171cf3d3650790bc36c149eef14724487d88
Author: Dominic Cleal <dcleal at redhat.com>
Date:   Mon Nov 29 11:33:57 2010 +0000

    Single package queries made more robust when dealing with pkgutil noise

diff --git a/lib/puppet/provider/package/pkgutil.rb b/lib/puppet/provider/package/pkgutil.rb
index 4914aa4..b80cf74 100755
--- a/lib/puppet/provider/package/pkgutil.rb
+++ b/lib/puppet/provider/package/pkgutil.rb
@@ -53,11 +53,17 @@ Puppet::Type.type(:package).provide :pkgutil, :parent => :sun, :source => :sun d
             next if line =~ /^=+> /                # catalog fetch
             next if line =~ /\d+:\d+:\d+ URL:/     # wget without -q
 
-            blastsplit(line)
+            parsed = blastsplit(line)
+
+            # When finding one package, ensure we picked up the package line
+            # itself, not any pkgutil noise.
+            next if hash[:justme] and parsed[:name] != hash[:justme]
+
+            parsed
         end.reject { |h| h.nil? }
 
         if hash[:justme]
-            return list[0]
+            return list[-1]
         else
             list.reject! { |h|
                 h[:ensure] == :absent

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list