Bug #8319

MacPorts package provider fails on absent package

Added by Matthias Pigulla 11 months ago. Updated 12 days ago.

Status:Merged - Pending Release Start date:07/08/2011
Priority:Normal Due date:
Assignee:Matthias Pigulla % Done:

0%

Category:provider
Target version:3.0.0
Affected Puppet version: Branch:
Keywords:macports
Votes: 0

Description

Patch suggested by Nigel.

macports.rb-diff - patch.diff (596 Bytes) Matthias Pigulla, 07/08/2011 09:05 am

History

Updated by Matthias Pigulla 11 months ago

To reproduce:

package { “lynx”: provider => macports, ensure => latest }

… where lynx should be absent

Updated by James Turnbull 9 months ago

  • Status changed from Unreviewed to Requires CLA to be signed
  • Assignee set to Matthias Pigulla

Hi Matthias

Could you sign the CLA at https://projects.puppetlabs.com/contributor_licenses/sign please?

Also it’d be great if you could submit this as a Git branch or a GitHub pull request as explained at https://github.com/puppetlabs/puppet/blob/master/CONTRIBUTING.md – thanks again for your contribution!

Updated by Matthias Pigulla 9 months ago

Done – https://github.com/puppetlabs/puppet/pull/55

This is the first time I did this so I hope it’s allright…

Updated by James Turnbull 9 months ago

  • Status changed from Requires CLA to be signed to In Topic Branch Pending Review
  • Target version set to 2.7.x

Updated by Jacob Helwig 9 months ago

  • Status changed from In Topic Branch Pending Review to Tests Insufficient

Left a few comments on the pull request about splitting the commit based on the tickets, and adding some testing.

Updated by Matthias Pigulla 9 months ago

New pull req is https://github.com/puppetlabs/puppet/pull/57

Updated by Patrick Carlisle 5 months ago

  • Status changed from Tests Insufficient to Merged - Pending Release
  • Target version changed from 2.7.x to 3.X

Merged in commit:a52eb6ecaa8dca06639c60f05f3204eefdb4d482

(#8319) Fix macports provider when ensure is latest but the package is not present

The query method is expected to return an array but could return nil if a
package was not present. Make sure it just returns an empty array in that
case.

Updated by Daniel Pittman 12 days ago

  • Target version changed from 3.X to 3.0.0

Also available in: Atom PDF