Issue #18427 has been updated by Luke M.
Puppet debug:
debug: Puppet::Type::Package::ProviderGem: Executing '/usr/bin/gem list
--local'
debug: Puppet::Type::Package::ProviderGem: Executing '/usr/bin/gem list
--remote --source http://puppet.fqdn.net:8808 facter$'
debug: /Stage[main]/Puppet::Client::Hpux/Package[facter]/ensure: facter
["1.6.17"] is installed, latest is "1.6.17 ruby"
debug: Package[facter](provider=gem): Executing '/usr/bin/gem install
--include-dependencies --source http://puppet.fqdn.net:8808 facter'
notice: /Stage[main]/Puppet::Client::Hpux/Package[facter]/ensure: ensure
changed '1.6.17' to '1.6.17 ruby'
Running the gem list command from above:
# /usr/bin/gem list --no-details --remote --source
http://puppet.fqdn.net:8808 facter$
*** REMOTE GEMS ***
facter (1.6.17 ruby)
# gem --version
1.4.0
It appears this output wasn't the case in previous releases of gems:
$ /usr/bin/gem list --no-details --remote --source http://puppet:8808
facter$
*** REMOTE GEMS ***
facter (1.6.17)
$ gem --version
1.3.7
A simple solution:
In the file lib/puppet/provider/package/gem.rb:
From:
44 name = $1
45 versions = $2.split(/,\s*/)
46 {
47 :name => name,
to
44 name = $1
45 versions = $2.sub(/ ruby/,"").split(/,\s*/)
46 {
47 :name => name,
Seems to work for me.
----------------------------------------
Bug #18427: gem package provider updates gems even if the gem is already at the
latest revision
https://projects.puppetlabs.com/issues/18427#change-87292
* Author: Luke M
* Status: Unreviewed
* Priority: Normal
* Assignee:
* Category: package
* Target version:
* Affected Puppet version: 2.7.20
* Keywords:
* Branch:
----------------------------------------
Using:
package{'facter':
ensure => latest,
provider => 'gem',
source => "http://puppet:8808",
}
Produces:
notice: /Stage[main]/Common_puppet::Hpux/Package[facter]/ensure: ensure
changed '1.6.17' to '1.6.17 ruby'
This happens on every puppet run.
--
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.