Bug #5855
FreeBSD package provider broken
| Status: | Closed | Start date: | 01/12/2011 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | FreeBSD | |||
| Target version: | 2.6.5 | |||
| Affected Puppet version: | 2.6.4 | Branch: | 2.6.next | |
| Keywords: | ||||
| Votes: | 1 |
Description
Since I couldn’t find any other reports about problems with the FreeBSD provider there is probably something in my environment that triggers this. Nevertheless:
uname -a:
FreeBSD localhost 8.1-RELEASE-p2 FreeBSD 8.1-RELEASE-p2 #0: Thu Dec 23 09:32:49 UTC 2010 localhost:/usr/obj/usr/src/sys/GENERIC amd64
pkg_info:
facter-1.5.8
puppet-2.6.4
ruby-1.8.7.302,1
When puppet tries to install packages via the freebsd provider it fails with the following error message:
Wed Jan 12 08:36:16 +0100 2011 /Stage[main]/Baseconf::Packages/Package[vim-lite]/ensure (err): change from absent to present failed:
Could not set 'present on ensure: undefined method `withenv' for #<Puppet::Type::Package::ProviderFreebsd:0x80265c548> at /manifests/packages.pp:28
I found that this was a similar error as in bug #3093, so I wrote the attached patch which solves the problem for me.
History
Updated by Johan Nilsson over 1 year ago
This patched solved the problem for me to. I am using the same version as above. Can it please be applied?
Updated by James Turnbull over 1 year ago
- Category set to FreeBSD
- Status changed from Unreviewed to Requires CLA to be signed
- Target version set to 2.6.5
Hi Fredrik – could I get you to do a couple of things for me?
- Can you please sign a CLA (see Contributer License link in the top menu).
- Have a read of our patch submission guidelines at http://projects.puppetlabs.com/projects/puppet/wiki/Development_Lifecycle. You don’t have to follow all the steps if you’re not Git savvy for example but we do need the CLA signed and it’d be great if you could send your code to the puppet-dev list.
Thanks for your contribution!
Updated by James Turnbull over 1 year ago
- Branch set to https://github.com/fredrik-eriksson/puppet/tree/ticket/2.6.x/5855
Updated by Daniel Pittman over 1 year ago
- Status changed from Requires CLA to be signed to Merged - Pending Release
- Assignee set to Daniel Pittman
- Affected Puppet version set to 2.6.4
- Branch changed from https://github.com/fredrik-eriksson/puppet/tree/ticket/2.6.x/5855 to 2.6.next
I have written appropriate tests to verify that the bug existed, and applied this patch to fix it.
The changes are now available in 2.6.next, awaiting testing.
Thanks for your contribution.
Updated by Russell Jackson over 1 year ago
Wouldn’t a better solution have been to just “include Puppet::Util::Execution” at the beginning?
Updated by Daniel Pittman over 1 year ago
Russell Jackson wrote:
Wouldn’t a better solution have been to just “include Puppet::Util::Execution” at the beginning?
That introduces a whole bunch more stuff into the namespace; I would prefer to keep this as targeted as possible for a fix on the release branch. That reduces the odds that I unintentionally cause something to break. :)
Updated by Matt Robinson over 1 year ago
- Status changed from Merged - Pending Release to Closed