diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2021-07-24 18:16:32 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-08-31 19:06:14 +0900 |
commit | 1b9b41472f0e7b9aac429dc8f95e778a3fce174d (patch) | |
tree | 94f1db38f7f2592d4df4fd46c7b898a36f1f8bb7 | |
parent | c2f376bcc006c3602ffd005fa1cb3cdf5c9d97fa (diff) |
[rubygems/rubygems] Completely avoid replacing sources when in multisource compatibility mode
Since this mode is only enabled in frozen mode, it's fine to use the
lockfile and means we don't have to "prepare" the replacement for
materialization.
https://github.com/rubygems/rubygems/commit/dda01b288e
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4789
-rw-r--r-- | lib/bundler/definition.rb | 2 | ||||
-rw-r--r-- | lib/bundler/source_list.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb index 3e357f76d7..a0a4867e09 100644 --- a/lib/bundler/definition.rb +++ b/lib/bundler/definition.rb @@ -721,7 +721,7 @@ module Bundler @locked_specs.each do |s| # Replace the locked dependency's source with the equivalent source from the Gemfile dep = @dependencies.find {|d| s.satisfies?(d) } - s.source = (dep && dep.source) || sources.get(s.source) + s.source = (dep && dep.source) || sources.get(s.source) unless multisource_allowed? # Don't add a spec to the list if its source is expired. For example, # if you change a Git gem to RubyGems. diff --git a/lib/bundler/source_list.rb b/lib/bundler/source_list.rb index 1c0105bf7e..d6310b78c0 100644 --- a/lib/bundler/source_list.rb +++ b/lib/bundler/source_list.rb @@ -215,7 +215,7 @@ module Bundler end def equal_source?(source, other_source) - return source.include?(other_source) if source.is_a?(Source::Rubygems) && other_source.is_a?(Source::Rubygems) && !merged_gem_lockfile_sections? + return source.include?(other_source) if source.is_a?(Source::Rubygems) && other_source.is_a?(Source::Rubygems) source == other_source end |