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

Juerg Walz jwalz at pobox.com
Tue May 10 08:05:56 UTC 2011


The following commit has been merged in the experimental branch:
commit 58ac7d385ebaa8755fe44df5a3d2db98b4bf4693
Author: Juerg Walz <jwalz at pobox.com>
Date:   Tue Mar 8 12:39:25 2011 +0800

    (#4258) pkgutil provider: better handling of short package names

diff --git a/lib/puppet/provider/package/pkgutil.rb b/lib/puppet/provider/package/pkgutil.rb
index 0e2056b..4a87932 100755
--- a/lib/puppet/provider/package/pkgutil.rb
+++ b/lib/puppet/provider/package/pkgutil.rb
@@ -56,7 +56,7 @@ Puppet::Type.type(:package).provide :pkgutil, :parent => :sun, :source => :sun d
 
     if hash[:justme]
       # Ensure we picked up the package line, not any pkgutil noise.
-      list.reject! { |h| h[:name] !~ /#{hash[:justme]}$/ }
+      list.reject! { |h| h[:name] != hash[:justme] }
       return list[-1]
     else
       list.reject! { |h| h[:ensure] == :absent }
@@ -80,6 +80,10 @@ Puppet::Type.type(:package).provide :pkgutil, :parent => :sun, :source => :sun d
       end
       hash[:avail] = $3
 
+      if justme !~ /^[A-Z]+/
+        hash[:name].sub! /^[A-Z]+/, ''
+      end
+
       if hash[:avail] =~ /^SAME\s*$/
         hash[:avail] = hash[:ensure]
       end

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list