Story #2478
closedSupport more conservative dependency solving
100%
Description
Description¶
Given two repositories:
Repository A with packages:
Foo-1.0
Foo-2.0
Foo-3.0
Bar-1.0
Repository B with packages:
Foo-1.0
And assuming Bar-1.0 requires Foo >= 1.0.
As i understand it, if a user performs a unit copy of Bar-1.0 from Repository A into Repository B with dependency resolution turned on (recursive = true), currently it will copy all packages from Repository A into Repository B that satisfies all of Bar-1.0's dependencies. In this example that would mean Foo-2.0, and Foo-3.0 are both copied to Repository B despite the fact that all of Bar-1.0's dependencies are already met in Repository B.
I think (and i think users would agree), that this should behave more like a 'yum install Foo-1.0' or a 'yum update Foo-1.0', in that it should only pull in dependencies that are actually needed by a client to install Bar-1.0 if they are not already in the target repository. So in this example the unit copy would only pull in Bar-1.0 and no additional dependencies.
Implementation¶
The PR https://github.com/pulp/pulp_rpm/pull/1122 implements the described behavior, having the libsolv
solver consider the target repository content.
An optional, future (Pulp3) behavior of actually upgrading the content in the target repository under the same circumstances i.e the opposite behavior, can be enforced by providing the solver a job constructed with the solv.Job.SOLVER_UPDATE
flag in addition to the current solv.Job.SOLVER_INSTALL
flag, possibly exposing this thru a REST API post request body field.
Related issues
Updated by semyers almost 8 years ago
- Tracker changed from Issue to Story
- % Done set to 0
I'd like to clarify the expectations for this a little bit, with another example.
Given this setup:
Repository A with packages:
Foo-1.0
Foo-2.0
Foo-3.0
Bar-1.0
Repository B with packages:
Foo-2.0
If Bar-1.0, with its "Foo>=1.0" requirement, is copied to Repository B, would you expect Foo-3.0 to not be copied into Repository B along with Bar-1.0, because the "Foo>=1.0" requirement is met by Foo-2.0?
Updated by mhrivnak almost 8 years ago
semyers wrote:
If Bar-1.0, with its "Foo>=1.0" requirement, is copied to Repository B, would you expect Foo-3.0 to not be copied into Repository B along with Bar-1.0, because the "Foo>=1.0" requirement is met by Foo-2.0?
That's my understanding, after jsherril explained it in-person.
Updated by milan over 6 years ago
- Status changed from NEW to POST
- Assignee set to milan
- Sprint set to Sprint 39
This is being implemented by the libsolv
refactoring; Issue #3715; PR: https://github.com/pulp/pulp_rpm/pull/1122
Moving to POST.
Updated by ipanova@redhat.com over 6 years ago
- Groomed changed from No to Yes
- Sprint Candidate changed from No to Yes
Updated by ipanova@redhat.com over 6 years ago
- Related to Story #3715: Reimplement unit dependency solving with the libsolv library added
Updated by dkliban@redhat.com over 6 years ago
- Sprint changed from Sprint 39 to Sprint 40
Added by milan over 6 years ago
Updated by milan over 6 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset f85007c0e6cc93e4320f12dfd9c7568707c25759.
Updated by dkliban@redhat.com about 6 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
- Platform Release set to 2.17.0
Resolve rpm (rich) dependencies via libsolv
Pulp now uses libsolv as a dependency solver to address recursive RPM unit dependency solving during e.g unit copy
Fixes: #3715 https://pulp.plan.io/issues/3715
Fixes: #2478 https://pulp.plan.io/issues/2478