[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.
[rubygems/rubygems] Fix conservative update downgrading top level gems
When
--conservative
is passed, explicit unlocks are set for top levelgems via
@unlock[:gems]
, so that only those particular gems areallowed 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 doneby the
converge_specs
method.However, the
converge_specs
method is also used for figuring outadditional lower bound requirements from the lockfile. But in this case,
even if gems are explicitly unlock in
@unlock[:gems]
, we still want toadd 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 theconverged_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