summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xlib/puppet/provider/package/pkgutil.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/puppet/provider/package/pkgutil.rb b/lib/puppet/provider/package/pkgutil.rb
index 0e2056b54..4a87932a8 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