summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2023-02-16 17:23:19 +0900
committernagachika <nagachika@ruby-lang.org>2024-08-06 18:59:52 +0900
commit2e7949f006e4ab092b3749b89130e6888b6fdf48 (patch)
treeee808e6e6c488a4fd6dc3549538f6325a969bcca
parent825c2450806ac1567c9f0c0c58893411fe6f37b5 (diff)
Use gemspec that keeps original dependencies
-rwxr-xr-xtool/rbinstall.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index 85d05eff25..97e1a47fba 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -1027,9 +1027,12 @@ install?(:ext, :comm, :gem, :'bundled-gems') do
next if /^\s*(?:#|$)/ =~ name
next unless /^(\S+)\s+(\S+).*/ =~ name
gem_name = "#$1-#$2"
- path = "#{srcdir}/.bundle/specifications/#{gem_name}.gemspec"
+ # Try to find the gemspec file for C ext gems
+ # 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)
- path = "#{srcdir}/.bundle/gems/#{gem_name}/#{gem_name}.gemspec"
+ path = "#{srcdir}/.bundle/specifications/#{gem_name}.gemspec"
unless File.exist?(path)
skipped[gem_name] = "gemspec not found"
next