[前][次][番号順一覧][スレッド一覧]

ruby-changes:61152

From: Nobuyoshi <ko1@a...>
Date: Sat, 9 May 2020 01:25:22 +0900 (JST)
Subject: [ruby-changes:61152] cc3352cc41 (master): rbinstall.rb: record bundled gem files

https://git.ruby-lang.org/ruby.git/commit/?id=cc3352cc41

From cc3352cc4148df1f83fc0ea3fd8780920420bb3a Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Sat, 9 May 2020 00:55:55 +0900
Subject: rbinstall.rb: record bundled gem files


diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index b8526c1..9471886 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -767,6 +767,7 @@ module RbInstall https://github.com/ruby/ruby/blob/trunk/tool/rbinstall.rb#L767
     def generate_bin_script(filename, bindir)
       return if same_bin_script?(filename, bindir)
       super
+      $installed_list.puts(File.join(without_destdir(bindir), filename)) if $installed_list
     end
 
     def same_bin_script?(filename, bindir)
@@ -777,6 +778,11 @@ module RbInstall https://github.com/ruby/ruby/blob/trunk/tool/rbinstall.rb#L778
       end
       false
     end
+
+    def write_spec
+      super
+      $installed_list.puts(without_destdir(spec_file)) if $installed_list
+    end
   end
 end
 
@@ -824,8 +830,8 @@ end https://github.com/ruby/ruby/blob/trunk/tool/rbinstall.rb#L830
 def install_default_gem(dir, srcdir)
   gem_dir = Gem.default_dir
   install_dir = with_destdir(gem_dir)
-  Gem.ensure_default_gem_subdirectories(install_dir, $dir_mode)
   prepare "default gems from #{dir}", gem_dir
+  makedirs(Gem.ensure_default_gem_subdirectories(install_dir, $dir_mode).map {|d| File.join(gem_dir, d)})
 
   default_spec_dir = Gem.default_specifications_dir
 
@@ -870,8 +876,8 @@ end https://github.com/ruby/ruby/blob/trunk/tool/rbinstall.rb#L876
 install?(:ext, :comm, :gem, :'bundled-gems') do
   gem_dir = Gem.default_dir
   install_dir = with_destdir(gem_dir)
-  Gem.ensure_gem_subdirectories(install_dir, $dir_mode)
   prepare "bundled gems", gem_dir
+  makedirs(Gem.ensure_gem_subdirectories(install_dir, $dir_mode).map {|d| File.join(gem_dir, d)})
   installed_gems = {}
   options = {
     :install_dir => install_dir,
@@ -910,6 +916,7 @@ install?(:ext, :comm, :gem, :'bundled-gems') do https://github.com/ruby/ruby/blob/trunk/tool/rbinstall.rb#L916
   end
   installed_gems, gems = Dir.glob(srcdir+'/gems/*.gem').partition {|gem| installed_gems.key?(File.basename(gem, '.gem'))}
   unless installed_gems.empty?
+    prepare "bundled gem cache", gem_dir+"/cache"
     install installed_gems, gem_dir+"/cache"
   end
   next if gems.empty?
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]