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

ruby-changes:36950

From: naruse <ko1@a...>
Date: Fri, 26 Dec 2014 15:45:01 +0900 (JST)
Subject: [ruby-changes:36950] naruse:r49031 (ruby_2_2): merge revision(s) 49015, 49016: [Backport #10647]

naruse	2014-12-26 15:44:52 +0900 (Fri, 26 Dec 2014)

  New Revision: 49031

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

  Log:
    merge revision(s) 49015,49016: [Backport #10647]
    
    * tool/rbinstall.rb: skip installing bundle gems if zlib is unavailable.
      [Bug #10647] [ruby-dev:48787]

  Modified directories:
    branches/ruby_2_2/
  Modified files:
    branches/ruby_2_2/ChangeLog
    branches/ruby_2_2/tool/rbinstall.rb
    branches/ruby_2_2/version.h
Index: ruby_2_2/ChangeLog
===================================================================
--- ruby_2_2/ChangeLog	(revision 49030)
+++ ruby_2_2/ChangeLog	(revision 49031)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/ChangeLog#L1
+Fri Dec 26 15:42:27 2014  NAKAMURA Usaku  <usa@r...>
+
+	* tool/rbinstall.rb: skip installing bundle gems if zlib is unavailable.
+	  [Bug #10647] [ruby-dev:48787]
+
 Thu Dec 25 17:42:01 2014  Nobuyoshi Nakada  <nobu@r...>
 
 	* ext/io/console/console.c (console_dev): send the given arguments
Index: ruby_2_2/version.h
===================================================================
--- ruby_2_2/version.h	(revision 49030)
+++ ruby_2_2/version.h	(revision 49031)
@@ -1,10 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_2/version.h#L1
 #define RUBY_VERSION "2.2.0"
-#define RUBY_RELEASE_DATE "2014-12-25"
-#define RUBY_PATCHLEVEL 0
+#define RUBY_RELEASE_DATE "2014-12-26"
+#define RUBY_PATCHLEVEL 1
 
 #define RUBY_RELEASE_YEAR 2014
 #define RUBY_RELEASE_MONTH 12
-#define RUBY_RELEASE_DAY 25
+#define RUBY_RELEASE_DAY 26
 
 #include "ruby/version.h"
 
Index: ruby_2_2/tool/rbinstall.rb
===================================================================
--- ruby_2_2/tool/rbinstall.rb	(revision 49030)
+++ ruby_2_2/tool/rbinstall.rb	(revision 49031)
@@ -709,20 +709,28 @@ install?(:ext, :comm, :gem) do https://github.com/ruby/ruby/blob/trunk/ruby_2_2/tool/rbinstall.rb#L709
 end
 
 install?(:ext, :comm, :gem) do
-  require 'pathname'
-  gem_dir = Gem.default_dir
-  directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode)
-  prepare "bundle gems", gem_dir, directories
-  Dir.glob(srcdir+'/gems/*.gem').each do |gem|
-    Gem.install gem, Gem::Requirement.default, :install_dir => with_destdir(Gem.dir), :domain => :local, :ignore_dependencies => true
-    gemname = Pathname(gem).basename
-    puts "#{" "*30}#{gemname}"
+  begin
+    require "zlib"
+  rescue LoadErroe
+  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
+    Dir.glob(srcdir+'/gems/*.gem').each do |gem|
+      Gem.install gem, Gem::Requirement.default, :install_dir => with_destdir(Gem.dir), :domain => :local, :ignore_dependencies => true
+      gemname = Pathname(gem).basename
+      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)+"/**/"))
+    # fix .gemspec permissions
+    File.chmod($data_mode, *Dir.glob(with_destdir(Gem.dir)+"/specifications/*.gemspec"))
+  else
+    puts "skip installing bundle gems because of lacking zlib"
   end
-  # fix directory permissions
-  # TODO: Gem.install should accept :dir_mode option or something
-  File.chmod($dir_mode, *Dir.glob(with_destdir(Gem.dir)+"/**/"))
-  # fix .gemspec permissions
-  File.chmod($data_mode, *Dir.glob(with_destdir(Gem.dir)+"/specifications/*.gemspec"))
 end
 
 parse_args()

Property changes on: ruby_2_2
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r49015-49016


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

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