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

ruby-changes:38087

From: nobu <ko1@a...>
Date: Sun, 5 Apr 2015 09:34:40 +0900 (JST)
Subject: [ruby-changes:38087] nobu:r50168 (trunk): rbinstall.rb: same options for gems

nobu	2015-04-05 09:34:27 +0900 (Sun, 05 Apr 2015)

  New Revision: 50168

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=50168

  Log:
    rbinstall.rb: same options for gems
    
    * tool/rbinstall.rb (gem): share same options between normal
      installer and unpacked installer.

  Modified files:
    trunk/tool/rbinstall.rb
Index: tool/rbinstall.rb
===================================================================
--- tool/rbinstall.rb	(revision 50167)
+++ tool/rbinstall.rb	(revision 50168)
@@ -736,13 +736,19 @@ install?(:ext, :comm, :gem) do https://github.com/ruby/ruby/blob/trunk/tool/rbinstall.rb#L736
   prepare "bundle gems", gem_dir, directories
   install_dir = with_destdir(gem_dir)
   installed_gems = {}
+  options = {
+    :install_dir => install_dir,
+    :bin_dir => with_destdir(bindir),
+    :domain => :local,
+    :ignore_dependencies => true,
+    :dir_mode => $dir_mode,
+    :data_mode => $data_mode,
+    :prog_mode => $prog_mode,
+    :wrappers => true,
+    :format_executable => true,
+  }
   Gem::Specification.each_spec([srcdir+'/gems/*']) do |spec|
-    ins = RbInstall::UnpackedInstaller.new(spec,
-                                           :install_dir => install_dir,
-                                           :bin_dir => with_destdir(bindir),
-                                           :wrappers => true,
-                                           :ignore_dependencies => true,
-                                           :format_executable => true)
+    ins = RbInstall::UnpackedInstaller.new(spec, options)
     puts "#{" "*30}#{spec.name} #{spec.version}"
     ins.install
     installed_gems[spec.full_name] = true
@@ -753,17 +759,6 @@ install?(:ext, :comm, :gem) do https://github.com/ruby/ruby/blob/trunk/tool/rbinstall.rb#L759
   end
   next if gems.empty?
   if defined?(Zlib)
-    options = {
-      :install_dir => install_dir,
-      :bin_dir => with_destdir(bindir),
-      :domain => :local,
-      :ignore_dependencies => true,
-      :dir_mode => $dir_mode,
-      :data_mode => $data_mode,
-      :prog_mode => $prog_mode,
-      :wrappers => true,
-      :format_executable => true,
-    }
     gems.each do |gem|
       Gem.install(gem, Gem::Requirement.default, options)
       gemname = File.basename(gem)

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

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