Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from ruby:master #608

Merged
merged 1 commit into from
Feb 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 11 additions & 14 deletions tool/rbinstall.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1138,21 +1138,18 @@ class << (w = [])
next unless /^(\S+)\s+(\S+).*/ =~ name
gem = $1
gem_name = "#$1-#$2"
# Try to find the original gemspec file
path = "#{srcdir}/.bundle/gems/#{gem_name}/#{gem}.gemspec"
unless File.exist?(path)
# Try to find the gemspec file for C ext gems
path = [
# gemspec that removed duplicated dependencies of bundled gems
"#{srcdir}/.bundle/gems/#{gem_name}/#{gem}.gemspec",
# gemspec for C ext gems, It has the original dependencies
# ex .bundle/gems/debug-1.7.1/debug-1.7.1.gemspec
# This gemspec keep the original dependencies
path = "#{srcdir}/.bundle/gems/#{gem_name}/#{gem_name}.gemspec"
unless File.exist?(path)
# Try to find the gemspec file for gems that hasn't own gemspec
path = "#{srcdir}/.bundle/specifications/#{gem_name}.gemspec"
unless File.exist?(path)
skipped[gem_name] = "gemspec not found"
next
end
end
"#{srcdir}/.bundle/gems/#{gem_name}/#{gem_name}.gemspec",
# original gemspec generated by rubygems
"#{srcdir}/.bundle/specifications/#{gem_name}.gemspec"
].find { |gemspec| File.exist?(gemspec) }
if path.nil?
skipped[gem_name] = "gemspec not found"
next
end
spec = load_gemspec(path, "#{srcdir}/.bundle/gems/#{gem_name}")
unless spec.platform == Gem::Platform::RUBY
Expand Down
Loading