Issue #13519 has been updated by Ken Barber.

Description updated

The main question is weither the arch should actually be in the version at all? 
My guess is no, however its something I'm unsure about in all honesty. 

Otherwise the regexp and the consequent test changes should be fairly 
straightforward.
----------------------------------------
Bug #13519: Gem provider regexp is wrong
https://projects.puppetlabs.com/issues/13519#change-58952

Author: Nathan Huisman
Status: Accepted
Priority: Normal
Assignee: Ken Barber
Category: package
Target version: 
Affected Puppet version: 2.7.12
Keywords: 
Branch: 


Regexp is having trouble figuring out what part of the "version" it should 
compare resulting in the gem being "reinstalled" every time a puppet run 
happens.

This only seems to happen on gems that have a native component, such as thin, 
json, bcrypt-ruby:

    notice: /Stage[main]/Opennebula::Dependencies::Gems/Package[thin]/ensure: 
ensure changed '1.3.1 x86_64-linux' to '1.3.1 ruby x86_64-linux'
    info: /Stage[main]/Opennebula::Dependencies::Gems/Package[thin]: Scheduling 
refresh of Exec[FixGemFiles]
    notice: /Stage[main]/Opennebula::Dependencies::Gems/Package[json]/ensure: 
ensure changed '1.6.4 x86_64-linux' to '1.6.4 ruby x86_64-linux'
    info: /Stage[main]/Opennebula::Dependencies::Gems/Package[json]: Scheduling 
refresh of Exec[FixGemFiles]
    notice: /Stage[main]/Opennebula::Dependencies::Gems/Package[mysql]/ensure: 
ensure changed '2.8.1 x86_64-linux' to '2.8.1 ruby x86_64-linux'

One quick fix is to change the regexp 

Line 48 from gem.rb

    #if desc =~ /^(\S+)\s+\((.+)\)/a
    if desc =~ /^(\S+)\s+\((\S+).*\)/

This seems to be because the arch string in gem list --remote is being included 
in the version when parsed with gemsplit:

    # gem list --remote bcrypt-ruby$

    *** REMOTE GEMS ***

    bcrypt-ruby (3.0.1 ruby java x86-mingw32 x86-mswin32-60)


-- 
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.

Reply via email to