> On 4 September 2011 20:09, Nils Anspach <nils.ansp...@googlemail.com> wrote: > > Hello list, > > > > I think there is something wrong with the OpenBSD package provider > > in Puppet 2.6.3 (4.9) and 2.7.1 (snapshot of 17/08): > > > If a 'package' resource is given a 'source' attribute that does not > > point to a particular package but to a repository instead and the > > PKG_PATH parameter in Puppet's environment is unset, an error is > > misleadingly raised. For instance, > > > > package { 'wget': > > ensure => 'present', > > source => 'ftp://<mirror>/pub/OpenBSD/4.9/packages/i386/:', > > } > > > > with PKG_PATH unset fails with > > > > err: /Stage[main]//Node[haumea]/Package[wget]/ensure: change > > from absent to present failed: Could not set 'present on > > ensure: undefined local variable or method `version' for > > #<Puppet::Type::Package::ProviderOpenbsd:0x214f7d760> at > > /etc/puppet/manifests/site.pp:147 > > > > This is due to 'pkg_info' being called on 'wget' in the provider > > without PKG_PATH being set to 'source'. Even if PKG_PATH was set > > in the environment, the current implementation would be incorrect, > > since it then checks for 'wget's version in PKG_PATH, but installs > > it from 'source' afterwards.
Jacek Masiulaniec schrieb am 07.09.2011 um 17:59:14 +0100: > http://www.mail-archive.com/puppet-dev@googlegroups.com/msg14497.html Your diff does not solve the above problem since it installs packages from the PKG_PATH of the local environment, ignoring the 'source' attribute. In particular, it fails in installing 'wget' in the example. I think, the PKG_PATH of the local environment should entirely be ignored in the provider and only the 'source' attribute be used. Nils