1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* tool/rbinstall.rb: skip installing bundle gems if zlib is unavailable.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2014-12-25 16:48:32 +00:00
parent e7011a3ec9
commit 4eaa327852
2 changed files with 25 additions and 13 deletions

View file

@ -1,3 +1,7 @@
Fri Dec 26 01:41:40 2014 NAKAMURA Usaku <usa@ruby-lang.org>
* tool/rbinstall.rb: skip installing bundle gems if zlib is unavailable.
Fri Dec 26 01:24:42 2014 NAKAMURA Usaku <usa@ruby-lang.org>
* tool/downloader.rb: support old versions of ruby.

View file

@ -709,20 +709,28 @@ install?(:ext, :comm, :gem) do
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()