Bug #2279
gem provider reinstalls older version of gem when a newer version is installed along side older version
| Status: | Closed | Start date: | 05/19/2009 | |
|---|---|---|---|---|
| Priority: | Low | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | package | |||
| Target version: | 2.7.12 | |||
| Affected Puppet version: | 2.6.4 | Branch: | ||
| Keywords: | interview | |||
| Votes: | -1 |
Description
When a specific version gem to be installed that is installed along side a newer version of the same gem; the specified version of the gem is reinstalled. Maybe the best way to handle this is to either warn that a newer version is installed.
versions: .24.7 and .24.8 os: ubuntu 8.04
Related issues
History
Updated by James Turnbull about 3 years ago
- Category set to package
- Status changed from Unreviewed to Needs More Information
- Assignee set to Puppet Community
- Target version set to 4
Can you provide some examples of runs with —debug —verbose —trace please.
Updated by James Turnbull almost 3 years ago
- Assignee deleted (
Puppet Community)
Updated by Darrell Fuhriman over 1 year ago
- Affected Puppet version changed from 0.24.8 to 2.6.4
It’s pretty easy to see. Here’s the relevant snippet from my config.
package { 'activesupport': ensure => '2.3.8', provider => gem}
I went and manually installed 3.0.4:
# gem list activesupport *** LOCAL GEMS *** activesupport (3.0.4, 2.3.8)
Here’s the relevant bits from the log:
debug: Package[activesupport](provider=gem): Executing '/opt/local/bin/gem install -v 2.3.8 --include-dependencies activesupport' notice: /Stage[main]/Production::Packages/Package[activesupport]/ensure: ensure changed '3.0.4' to '2.3.8'
Obviously doesn’t tell us much we don’t already know.
the problem only manifests if there’s a newer version than the requested one also installed. See self.gemsplit in lib/puppet/provider/package/gem.rb
An interim solution might be to have the provider call “gem list —installed —version X gemname” to help it decide if something is extant.
Realistically, a proper solution requires a major refactoring to the provider so that it understands that there can be multiple versions of a single package installed and should include the ability to purge versions which are not defined as being installed. i.e.
package {'somegem': ensure => ['1.1.0', '1.0.0'], provider => :gem}
It would guarantee that only those two versions are installed (i.e. it would remove 1.2.0).
Gem are the worst for this, I think, because lazy developers create ridiculous, and impossible to manage dependency trees.
Updated by James Turnbull 9 months ago
- Status changed from Needs More Information to Closed
This is fixed in 2.6.9.
Updated by James Turnbull 9 months ago
- Target version deleted (
4)
Updated by Matt Robinson 6 months ago
- Status changed from Closed to Re-opened
This has not been fixed, reopening.
Updated by Matt Robinson 6 months ago
- Keywords set to interview
Updated by Darrell Fuhriman 5 months ago
Agreed. Not sure what change would make one thing this is not happening anymore.
Updated by Matt Robinson 4 months ago
- Status changed from Re-opened to Merged - Pending Release
- Target version set to 2.7.x
This was merged in commit:e415daa44d80c15035bbe837f02134e8776b46bc
Updated by Matthaus Litteken 3 months ago
- Status changed from Merged - Pending Release to Closed
- Target version changed from 2.7.x to 2.7.12
Released in Puppet 2.7.12rc1