Bug #941
OpenBSD package provider has incorrect :info call
| Status: | Closed | Start date: | ||
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | - | |||
| Target version: | 0.24.0 | |||
| Affected Puppet version: | 0.25.4 | Branch: | ||
| Keywords: | ||||
| Votes: | 0 |
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’
History
Updated by David Goldsmith over 4 years ago
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.
Updated by Luke Kanies over 4 years ago
Marking #940 as a duplicate.
Updated by Luke Kanies over 4 years ago
- Status changed from 1 to Closed
- 7 set to fixed
Fixed in commit:b852c2fda0d43ce6437b0464e3458c2a686ed05d.