Issue #14843 has been updated by Matthaus Litteken.
This seemed to address the issue (I borrowed the same syntax from the dpkg
provider).
diff --git a/lib/puppet/provider/package/rpm.rb
b/lib/puppet/provider/package/rpm.rb
index ff59b6f..6eef371 100755
--- a/lib/puppet/provider/package/rpm.rb
+++ b/lib/puppet/provider/package/rpm.rb
@@ -35,7 +35,7 @@ Puppet::Type.type(:package).provide :rpm, :source =>
:rpm, :parent => Puppet::Pr
# list out all of the packages
begin
- execpipe("#{command(:rpm)} -qa #{sig} --nodigest --qf
'#{NEVRAFORMAT}\n'") { |process|
+ Puppet::Util::Execution.execpipe("#{command(:rpm)} -qa #{sig}
--nodigest --qf '#{NEVRAFORMAT}\n'") { |process|
# now turn each returned line into a package object
process.each_line { |line|
hash = nevra_to_hash(line)
----------------------------------------
Bug #14843: rpm provider can't list packages via 'puppet resource' application
https://projects.puppetlabs.com/issues/14843#change-64692
Author: Chris Price
Status: Accepted
Priority: Urgent
Assignee:
Category:
Target version:
Affected Puppet version:
Keywords:
Branch:
It's possible that this is just a terrible error message as opposed to an
actual bug. However, I just installed puppet 3.0-rc via the apt/yum repos on a
clean centos6 VM and a clean ubuntu 10.04 VM. Running this command:
puppet resource package
on the ubuntu machine yields output that looks like this:
...
package { 'time':
ensure => '1.7-23build1',
}
package { 'tzdata':
ensure => '2011j-0ubuntu0.10.04',
}
package { 'ubuntu-keyring':
ensure => '2010.11.09',
}
...
However, running the same command on the CentOS6 machine yields:
Error: Could not run: no block given
Running again with --trace gives:
Error: Could not run: no block given
/usr/lib/ruby/site_ruby/1.8/puppet/util/execution.rb:35
/usr/lib/ruby/1.8/open-uri.rb:32
/usr/lib/ruby/1.8/open-uri.rb:32
/usr/lib/ruby/site_ruby/1.8/puppet/util/execution.rb:34
/usr/lib/ruby/site_ruby/1.8/puppet/provider.rb:54
<b>/usr/lib/ruby/site_ruby/1.8/puppet/provider/package/rpm.rb:38</b>
/usr/lib/ruby/site_ruby/1.8/puppet/type.rb:892
/usr/lib/ruby/site_ruby/1.8/puppet/type.rb:885
/usr/lib/ruby/site_ruby/1.8/puppet/type.rb:885
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/resource/ral.rb:14
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:255
/usr/lib/ruby/site_ruby/1.8/puppet/application/resource.rb:230
/usr/lib/ruby/site_ruby/1.8/puppet/application/resource.rb:142
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:350
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:342
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:436
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:342
/usr/lib/ruby/site_ruby/1.8/puppet/util.rb:529
/usr/lib/ruby/site_ruby/1.8/puppet/application.rb:342
/usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:74
/usr/bin/puppet:10
I suspect the problem is in the RPM provider, since that's the major difference
between the code path for this command on Cent vs. Ubuntu. I haven't tried
this command with previous versions of puppet on redhat-based machines; I
assume it should work, but if for some reason it's not supported, we at least
need to do a better job with the error messaging.
(The VMs used to repro this are the same ones we use for PE acceptance testing.)
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.