Accepting request 128985 from devel:languages:ruby:backports

- fix ruby provides/requires with ruby 1.8

OBS-URL: https://build.opensuse.org/request/show/128985
OBS-URL: https://build.opensuse.org/package/show/devel:languages:ruby/ruby-common?expand=0&rev=10
This commit is contained in:
Stephan Kulow 2012-07-26 11:15:10 +00:00 committed by Git OBS Bridge
parent c609c92ffb
commit 0c14cc3779
2 changed files with 10 additions and 6 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Jul 26 11:13:13 UTC 2012 - coolo@suse.com
- fix ruby provides/requires with ruby 1.8
-------------------------------------------------------------------
Thu Jul 26 10:28:30 UTC 2012 - coolo@suse.com

View File

@ -22,6 +22,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
require 'optparse'
require 'rubygems'
require 'rubygems/specification'
opts = OptionParser.new("Usage: #{$0}")
@ -43,16 +44,14 @@ end
gemspecs=Array.new
$stdin.each_line do |line|
line.match(%r{.*/specifications/.*\.gemspec$}) do |m|
gemspecs << [m[0], Gem::Specification.load(m[0])]
end
m = line.match(%r{.*/specifications/.*\.gemspec$})
gemspecs << [m[0], Gem::Specification.load(m[0])] if m
end
gemspecs.each do |file, spec|
rubyabi=nil
file.match(%r{.*/gems/([^/]*)/.*}) do |m|
rubyabi=m[1]
end
m = file.match(%r{.*/gems/([^/]*)/.*})
rubyabi=m[1] if m
if provides
# old forms
puts "rubygem-#{spec.name} = #{spec.version}"