Issue #16752 has been updated by eric sorenson.
Hi Jasper, thanks for the ping -- I'm now working on a branch with this patch in it, to turn it into a pull request. I am adding some tests around this behavior change so we will know if it regresses. Two questions now that I'm poking at the code and trying to test it (without access to an openbsd box, so sorry if this is ignorant) 1. It looks like pkg.conf supports multiple options with the `+=` operator (according to http://www.rootr.net/man/man/pkg.conf/5) -- Does `installpath` al so support this? I notice you use `pkgconf.grep(/^installpath/).first`, but what if the package only exists on one of the later urls? 2. The following code, which actually does the installation, looks like it will only work with the URL-based `resource[:source]` that we set from pkg.conf, if and only if, the package name is specified with a leading `/` (::FILE::Separator) -- is that the usual practise? Coming from a RH/yum-centric background I would expect that if packages are available on a remote repository I can just specify the bare packagename and let the repository figure it out: <pre> if @resource[:source][-1,1] == ::File::SEPARATOR e_vars = { 'PKG_PATH' => @resource[:source] } full_name = [ @resource[:name], get_version || @resource[:ensure], @resource[:flavor] ].join('-').chomp('-').chomp('-') else e_vars = {} full_name = @resource[:source] end </pre> ---------------------------------------- Feature #16752: Enhance OpenBSD package provider to use pkg.conf(5) https://projects.puppetlabs.com/issues/16752#change-76033 Author: Jasper Lievisse Adriaanse Status: Accepted Priority: Normal Assignee: eric sorenson Category: Target version: Affected Puppet version: Keywords: Branch: On OpenBSD it's possible to create a file called /etc/pkg.conf which lists paths from which to install packages from. When a PKG_PATH is not set, pkg_add will look in /etc/pkg.conf and use the path found there. Currently the OpenBSD package provider in Puppet needs to have 'source' set and will ignore /etc/pkg.conf, the attach patch adjusts this behavior. If no no 'source' was explicitly set, then /etc/pkg.conf will be consulted. This patch was agreed upon by the maintainer of the puppet package in OpenBSD. -- 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.
