From: Dominic Cleal <dcl...@redhat.com>
Signed-off-by: Juerg Walz <jw...@pobox.com> --- Local-branch: tickets/master/4258-dev lib/puppet/provider/package/pkgutil.rb | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) 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 -- 1.7.3.2 -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to puppet-dev@googlegroups.com. To unsubscribe from this group, send email to puppet-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.