mirror of
https://github.com/ruby/ruby.git
synced 2025-08-24 13:34:17 +02:00
[rubygems/rubygems] Fix gem install
sometimes compiling the wrong source files
If a previous copy of a gem is already installed, RubyGems will not
reinstall the gem but only recompile its extensions. This seems like a
good idea, but only if the gem is being installed from the registry.
If we are installing a locally built package, then the package should be
completely reinstalled and extensions compiled from the sources in the
locally built package, not from the sources in the previous
installation.
1c282d98d5
This commit is contained in:
parent
0c2f0ffa60
commit
0a62e82ac4
2 changed files with 55 additions and 6 deletions
|
@ -181,13 +181,10 @@ class Gem::RequestSet
|
|||
|
||||
# Install requested gems after they have been downloaded
|
||||
sorted_requests.each do |req|
|
||||
if req.installed?
|
||||
if req.installed? && @always_install.none? {|spec| spec == req.spec.spec }
|
||||
req.spec.spec.build_extensions
|
||||
|
||||
if @always_install.none? {|spec| spec == req.spec.spec }
|
||||
yield req, nil if block_given?
|
||||
next
|
||||
end
|
||||
yield req, nil if block_given?
|
||||
next
|
||||
end
|
||||
|
||||
spec =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue