Issue #3000 has been updated by Luke Kanies. Status changed from Needs design decision to Accepted
Seems like a great idea, although I might be tempted to move it to rowlf given that it's not so much a bug fix as a refactor. ---------------------------------------- Refactor #3000: Normalize package providers' treatment of absent packages http://projects.reductivelabs.com/issues/3000 Author: Markus Roberts Status: Accepted Priority: Normal Assigned to: Category: package Target version: 0.25.3 Affected version: 0.25.2 Branch: It appears that there is no consensus on how package providers should deal with an attempt to query an absent package. At present: * *bsd propogate error or return nil * appdmg, apple, pkgdmg no tool call (direct file system check), so not directly analogous return nil * blastwave: Puppet.warning "Cannot match %s" % line return {:ensure => :absent} * darwin port: raise Puppet::DevError,"Failed to match dpkg line %s" % line * dpkg: return {:ensure => :purged, :status => 'missing', :name => @resource[:name], :error => 'ok'} * gem Puppet.warning "Could not match %s" % desc return nil * hpux return {:ensure => :absent} * portage: raise Puppet::Error.new("No package found with the specified name [#{not_found_value}]") * ports, rpm, rug, up2date, urpmi, yum return nil The most popular answer is to return nil (which could manifest an analog of #2940); the second most popular is raising/propagating an error (which is #2999). I think my favorite would be {:ensure => :absent} but I'm unclear why this isn't being done more often. -- 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://reductivelabs.com/redmine/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.
