Skip to content

Commit

Permalink
Make installation messages verbose a little [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Jan 18, 2023
1 parent 8e53f09 commit 03f5db0
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions tool/rbinstall.rb
Expand Up @@ -999,6 +999,7 @@ def install_default_gem(dir, srcdir, bindir)
end

installed_gems = {}
skipped = {}
options = {
:install_dir => install_dir,
:bin_dir => with_destdir(bindir),
Expand Down Expand Up @@ -1029,11 +1030,20 @@ def install_default_gem(dir, srcdir, bindir)
path = "#{srcdir}/.bundle/specifications/#{gem_name}.gemspec"
unless File.exist?(path)
path = "#{srcdir}/.bundle/gems/#{gem_name}/#{gem_name}.gemspec"
next unless File.exist?(path)
unless File.exist?(path)
skipped[gem_name] = "gemspec not found"
next
end
end
spec = load_gemspec(path, "#{srcdir}/.bundle/gems/#{gem_name}")
next unless spec.platform == Gem::Platform::RUBY
next unless spec.full_name == gem_name
unless spec.platform == Gem::Platform::RUBY
skipped[gem_name] = "not ruby platform (#{spec.platform})"
next
end
unless spec.full_name == gem_name
skipped[gem_name] = "full name unmatch #{spec.full_name}"
next
end
spec.extension_dir = "#{extensions_dir}/#{spec.full_name}"
package = RbInstall::DirPackage.new spec
ins = RbInstall::UnpackedInstaller.new(package, options)
Expand All @@ -1051,7 +1061,11 @@ def install_default_gem(dir, srcdir, bindir)
install installed_gems, gem_dir+"/cache"
end
unless gems.empty?
puts "skipped bundled gems: #{gems.join(' ')}"
skipped.default = "not found in bundled_gems"
puts "skipped bundled gems:"
gems.each do |gem|
printf " %-32s%s\n", File.basename(gem), skipped[gem]
end
end
end

Expand All @@ -1071,6 +1085,7 @@ def install_default_gem(dir, srcdir, bindir)
end
installs.flatten!
installs -= $exclude.map {|exc| $install_procs[exc]}.flatten
puts "Installing to #$destdir" unless installs.empty?
installs.each do |block|
dir = Dir.pwd
begin
Expand Down

0 comments on commit 03f5db0

Please sign in to comment.