diff options
| author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2024-02-16 16:33:25 +0900 |
|---|---|---|
| committer | nagachika <nagachika@ruby-lang.org> | 2024-08-06 18:59:52 +0900 |
| commit | 84f2da297f325b1fcde887bc307a4719cd5d9dab (patch) | |
| tree | 54284f5a355c34fbb5fee26281974ad228e791d5 | |
| parent | 6517f15f9f07d1a516532fb08c264c1a113e9993 (diff) | |
Try to find gemspec from `.bundle/specifications
| -rwxr-xr-x | tool/rbinstall.rb | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index e3d707c200..ef16a09601 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb @@ -1026,17 +1026,22 @@ install?(:ext, :comm, :gem, :'bundled-gems') do File.foreach("#{srcdir}/gems/bundled_gems") do |name| next if /^\s*(?:#|$)/ =~ name next unless /^(\S+)\s+(\S+).*/ =~ name + gem = $1 gem_name = "#$1-#$2" - # Try to find the gemspec file - path = "#{srcdir}/.bundle/gems/#{gem_name}/#{name}.gemspec" + # 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 # 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) - skipped[gem_name] = "gemspec not found" - next + # 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 end spec = load_gemspec(path, "#{srcdir}/.bundle/gems/#{gem_name}") |
