diff options
author | David RodrÃguez <[email protected]> | 2025-06-12 19:48:36 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2025-06-17 15:09:34 +0900 |
commit | 0a62e82ac4ea75f5dd435c922500cb87af40612c (patch) | |
tree | 5ef8cf1cb0a4cc517e248c5e6463161842ca954a /lib | |
parent | 0c2f0ffa60930308cf07201527489475cf98781f (diff) |
[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.
https://github.com/rubygems/rubygems/commit/1c282d98d5
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rubygems/request_set.rb | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/rubygems/request_set.rb b/lib/rubygems/request_set.rb index 875df7e019..5a855fdb10 100644 --- a/lib/rubygems/request_set.rb +++ b/lib/rubygems/request_set.rb @@ -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 = |