From 3eea85963b35ae17d22030d8dbed1820f1d4a6a5 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Thu, 16 Feb 2023 17:23:19 +0900 Subject: Use gemspec that keeps original dependencies --- tool/rbinstall.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tool') diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index ae4a6940f1..90697bfe92 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 -- cgit v1.2.1