Issue #14843 has been updated by Matthaus Litteken.

Actually it looks like the solution will be the following.

    diff --git a/lib/puppet/provider.rb b/lib/puppet/provider.rb
    index 04d1823..c964d1f 100644
    --- a/lib/puppet/provider.rb
    +++ b/lib/puppet/provider.rb
    @@ -50,8 +50,8 @@ class Puppet::Provider
    Puppet::Util::Execution.execpipe(*args, &block)
    end
    -  def self.execpipe(*args)
    -    Puppet::Util::Execution.execpipe(*args)
    +  def self.execpipe(*args, &block)
    +    Puppet::Util::Execution.execpipe(*args, &block)
    end
    def execfail(*args)

The acceptance test would still work for rpm.
----------------------------------------
Bug #14843: rpm provider can't list packages via 'puppet resource' application
https://projects.puppetlabs.com/issues/14843#change-64752

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.

Reply via email to