diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2022-08-18 23:28:26 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2022-08-23 10:45:57 +0900 |
commit | 4790d0accdb745f9d8e605fd42eab712e4ebf834 (patch) | |
tree | 2e85b8aea7a0281fa52b7b2b13cb31f852eb9d7f /spec/bundler/install/gems | |
parent | c21c9a29eead43364e6347c0ce2f468d26391b1b (diff) | |
download | ruby-4790d0accdb745f9d8e605fd42eab712e4ebf834.tar.gz |
[rubygems/rubygems] Fix conservative update downgrading top level gems
When `--conservative` is passed, explicit unlocks are set for top level
gems via `@unlock[:gems]`, so that only those particular gems are
allowed to be updated.
When we compute the "base resolve" from the lockfile (the set of gems
whose versions should be kept pinned by the resolver), we always exclude
gems explicitly unlocked through `@unlock[:gems]` from it. This is done
by the `converge_specs` method.
However, the `converge_specs` method is also used for figuring out
additional lower bound requirements from the lockfile. But in this case,
even if gems are explicitly unlock in `@unlock[:gems]`, we still want to
add the additional requirement, so that gems are not downgraded by the
resolver.
So the solution is to move the line filtering out gems in
`@unlock[:gems]` from the `converged_specs` method out of that method,
so that it only applies for computing the "base resolve", but not the
addtional lower bound requirements.
https://github.com/rubygems/rubygems/commit/405119bd7b
Diffstat (limited to 'spec/bundler/install/gems')
0 files changed, 0 insertions, 0 deletions