Puppet: System Administration Automated

Support

Ticket #941 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

OpenBSD package provider has incorrect :info call

Reported by: dgoldsmith Assigned to: community
Priority: normal Milestone: misspiggy
Component: library Version:
Severity: normal Keywords: openbsd package
Cc: Triage Stage: Accepted
Attached Patches: Code Complexity: Unknown

Description

In provider/package/openbsd.rb, at the top of the file, you have:

Puppet::Type.type(:package).provide :openbsd, :parent => Puppet::Provider::Package do

desc "OpenBSD's form of pkg_add support."

commands :pkginfo => "pkg_info", :pkgadd => "pkg_add", :pkgdelete => "pkg_delete"

This defines ':pkginfo' as the symbolic command for getting information about currently installed packages.

Later on, the 'listcmd' fucntion is defined as:

def self.listcmd

[command(:info), "-a"]

end

There is no ':info' name. It needs to be defined like:

def self.listcmd

[command(:pkginfo), " -a"]

end

If I did not add the space before the '-a', it tried to call '/usr/sbin/pkg_info-a' rather than '/usr/sbin/pkg_info -a'

Change History

11/30/07 15:40:05 changed by dgoldsmith

This will also correct the issue in ticket #940 where it was attempting to reinstall the package each run. Now it can figure out that the package is already installed so there is no need to install it.

12/06/07 17:58:35 changed by luke

Marking #940 as a duplicate.

12/06/07 17:58:44 changed by luke

  • stage changed from Unreviewed to Accepted.
  • milestone set to misspiggy.

12/10/07 19:18:50 changed by luke

  • status changed from new to closed.
  • resolution set to fixed.

Fixed in [b852c2fda0d43ce6437b0464e3458c2a686ed05d].