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

ruby-changes:37188

From: nobu <ko1@a...>
Date: Fri, 16 Jan 2015 13:35:27 +0900 (JST)
Subject: [ruby-changes:37188] nobu:r49269 (trunk): rbinstall.rb: always make gem directories

nobu	2015-01-16 13:35:18 +0900 (Fri, 16 Jan 2015)

  New Revision: 49269

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

  Log:
    rbinstall.rb: always make gem directories
    
    * tool/rbinstall.rb (gem): always make gem directories regardless
      of zlib.

  Modified files:
    trunk/tool/rbinstall.rb
Index: tool/rbinstall.rb
===================================================================
--- tool/rbinstall.rb	(revision 49268)
+++ tool/rbinstall.rb	(revision 49269)
@@ -707,17 +707,17 @@ install?(:ext, :comm, :gem) do https://github.com/ruby/ruby/blob/trunk/tool/rbinstall.rb#L707
 end
 
 install?(:ext, :comm, :gem) do
+  gem_dir = Gem.default_dir
+  directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode)
+  prepare "bundle gems", gem_dir, directories
+  install_dir = with_destdir(gem_dir)
   begin
     require "zlib"
   rescue LoadError
   end
   if defined?(Zlib)
-    require 'pathname'
-    gem_dir = Gem.default_dir
-    directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode)
-    prepare "bundle gems", gem_dir, directories
     options = {
-      :install_dir => with_destdir(gem_dir),
+      :install_dir => install_dir,
       :domain => :local,
       :ignore_dependencies => true,
       :dir_mode => $dir_mode,
@@ -726,14 +726,14 @@ install?(:ext, :comm, :gem) do https://github.com/ruby/ruby/blob/trunk/tool/rbinstall.rb#L726
     }
     Dir.glob(srcdir+'/gems/*.gem').each do |gem|
       Gem.install(gem, Gem::Requirement.default, options)
-      gemname = Pathname(gem).basename
+      gemname = File.basename(gem)
       puts "#{" "*30}#{gemname}"
     end
     # fix directory permissions
     # TODO: Gem.install should accept :dir_mode option or something
-    File.chmod($dir_mode, *Dir.glob(with_destdir(gem_dir)+"/**/"))
+    File.chmod($dir_mode, *Dir.glob(install_dir+"/**/"))
     # fix .gemspec permissions
-    File.chmod($data_mode, *Dir.glob(with_destdir(gem_dir)+"/specifications/*.gemspec"))
+    File.chmod($data_mode, *Dir.glob(install_dir+"/specifications/*.gemspec"))
   else
     puts "skip installing bundle gems because of lacking zlib"
   end

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

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