Bug #6096

FreeBSD package removal

Added by Gabriel Filion over 1 year ago. Updated over 1 year ago.

Status:Duplicate Start date:01/31/2011
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:-
Target version:-
Affected Puppet version: Branch:
Keywords:
Votes: 0

Description

Asking to remove a package on FreeBSD doesn’t do what would be expected. It passes the name + ‘-absent’ to pkg_remove.

example manifest:

node freebsd.example.com {
  package { "sendmail": ensure => absent, }
}

output from puppetd -t:

err: //koumbit::common/Package[sendmail]/ensure: change from 8.14.4_2 to absent failed: Execution of '/usr/sbin/pkg_delete sendmail-absent' returned 1: pkg_delete: no such package 'sendmail-absent' installed

I tested this with both puppet 0.25.4 and 2.6.4 and both of those versions behave the same.


Related issues

related to Puppet - Bug #4996: FreeBSD package provider rewrite to use port origin when ... Code Insufficient 10/14/2010

History

Updated by Stefan Schulte over 1 year ago

How whould you delete a package on the commandline? Do you just have to provide the packagename or also the package version?

Currently the uninstall method is defined like this

# provider/package/freebsd.rb
  def uninstall
    pkgdelete "#{@resource[:name]}-#{@resource.should(:ensure)}"
  end

I have no idea why. Maybe this was supposed to be in the install method? If the user defines something like ensure => 2.6.1? Havent found anything in the commit comments.

Updated by Russell Jackson over 1 year ago

See #4996. Another competing patch was posted to the dev list not too long ago.

Updated by James Turnbull over 1 year ago

  • Status changed from Unreviewed to Duplicate

Closing in favour of #4996.

Also available in: Atom PDF