Project

Profile

Help

Story #2478

Support more conservative dependency solving

Added by jsherril@redhat.com over 3 years ago. Updated about 1 year ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Sprint/Milestone:
-
Start date:
Due date:
% Done:

100%

Estimated time:
Platform Release:
2.17.0
Groomed:
Yes
Sprint Candidate:
Yes
Tags:
Pulp 2
Sprint:
Sprint 40

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.


Checklist


Related issues

Related to RPM Support - Story #3715: Reimplement unit dependency solving with the libsolv libraryCLOSED - CURRENTRELEASE

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

Associated revisions

Revision f85007c0 View on GitHub
Added by milan almost 2 years ago

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

History

#2 Updated by semyers over 3 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?

#3 Updated by mhrivnak over 3 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.

#10 Updated by milan about 2 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.

#11 Updated by milan about 2 years ago

  • Description updated (diff)

#12 Updated by milan about 2 years ago

  • Description updated (diff)

#13 Updated by ipanova@redhat.com about 2 years ago

  • Groomed changed from No to Yes
  • Sprint Candidate changed from No to Yes

#14 Updated by ipanova@redhat.com about 2 years ago

  • Related to Story #3715: Reimplement unit dependency solving with the libsolv library added

#16 Updated by dkliban@redhat.com almost 2 years ago

  • Sprint changed from Sprint 39 to Sprint 40

#17 Updated by milan almost 2 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

#18 Updated by dkliban@redhat.com almost 2 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE
  • Platform Release set to 2.17.0

#20 Updated by bmbouter about 1 year ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF