Issue #3000 has been updated by Lance Albertson.
To me this is more of a bug than just a refactor. In the case of the portage provider, it should not error and fail the resource if I'm ensuring a package is absent if the package is not found by eix. ---------------------------------------- Refactor #3000: Normalize package providers' treatment of absent packages http://projects.puppetlabs.com/issues/3000 Author: Markus Roberts Status: Accepted Priority: Normal Assignee: Category: package Target version: Statler 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://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.
