diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-19 03:05:37 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-19 03:05:37 +0000 |
commit | f8bcd57cb7223c59901cb9c73a4be976f3a583e8 (patch) | |
tree | baa2c8a7badab14460fb28d17aaefb1cb021a055 /lib/rubygems | |
parent | 4cd675ea9edeaeee7a640dd10037b92318ad6844 (diff) | |
download | ruby-f8bcd57cb7223c59901cb9c73a4be976f3a583e8.tar.gz |
* lib/rubygems: Update to RubyGems master af60443. Changes include:
* Improved speed of `gem install --ignore-dependencies`.
* Open read-write for exclusive flock. [ruby-trunk - Bug #9257]
* Remove specification before install to prevent infinite loop.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems')
-rw-r--r-- | lib/rubygems/commands/install_command.rb | 32 | ||||
-rw-r--r-- | lib/rubygems/installer.rb | 2 |
2 files changed, 21 insertions, 13 deletions
diff --git a/lib/rubygems/commands/install_command.rb b/lib/rubygems/commands/install_command.rb index d2dd7ac920..56ff8fc564 100644 --- a/lib/rubygems/commands/install_command.rb +++ b/lib/rubygems/commands/install_command.rb @@ -200,25 +200,31 @@ to write the specification by hand. For example: req = Gem::Requirement.create(version) - inst = Gem::DependencyInstaller.new options + if options[:ignore_dependencies] + inst = Gem::Installer.new name, options + inst.install + @installed_specs.push(inst.spec) + else + inst = Gem::DependencyInstaller.new options - if options[:explain] - request_set = inst.resolve_dependencies name, req + if options[:explain] + request_set = inst.resolve_dependencies name, req - puts "Gems to install:" + puts "Gems to install:" - request_set.specs.map { |s| s.full_name }.sort.each do |s| - puts " #{s}" - end + request_set.specs.map { |s| s.full_name }.sort.each do |s| + puts " #{s}" + end - return - else - inst.install name, req - end + return + else + inst.install name, req + end - @installed_specs.push(*inst.installed_gems) + @installed_specs.push(*inst.installed_gems) - show_install_errors inst.errors + show_install_errors inst.errors + end end def install_gems # :nodoc: diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb index f3172752c2..f8eb2c2145 100644 --- a/lib/rubygems/installer.rb +++ b/lib/rubygems/installer.rb @@ -212,6 +212,8 @@ class Gem::Installer def install pre_install_checks + FileUtils.rm_f File.join gem_home, 'specifications', @spec.spec_name + run_pre_install_hooks # Completely remove any previous gem files |