Project

Profile

Help

Issue #4375

Recursive copy doesn't solve rich dependencies correctly

Added by ttereshc 3 months ago. Updated 5 days ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
-
Severity:
2. Medium
Version:
Platform Release:
2.18.1
Blocks Release:
OS:
Backwards Incompatible:
No
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:
Sprint 48

Description

There are recursive and recursive_conservative flags which can be specified during copy.
When recursive_conservative flag is set to True, rich and weak dependencies are resolved properly.
When recursive flag is set to True, rich dependencies are NOT resolved properly, weak dependencies are resolved properly.

From the Cobbler package from the fixtures repo:

<rpm:requires>
  <rpm:entry name="(Scotch = 8-10 and contireau = 2-10 and tablespoon-sugar = 1-0)"/>
  <rpm:entry name="icecubes"/>
</rpm:requires>
<rpm:recommends>
  <rpm:entry name="(orange-bits if fruity)"/>
</rpm:recommends>

From the dependencies above it's clear that due to and operator all the packages are required, but only Scotch is copied and not contireau and tablespoon-sugar.

pulp-admin rpm repo create --repo-id foo --feed https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-richnweak-deps/
pulp-admin rpm repo sync run --repo-id foo
pulp-admin rpm repo create --repo-id bar
pulp-admin rpm repo copy rpm --from-repo-id foo --to-repo-id bar --str-eq name=Cobbler --recursive

This command may be exited via ctrl+c without affecting the request.

[\]
Running...

Copied:
  Cobbler-1-0-noarch
  Scotch-8-10-noarch
  icecubes-2-3-noarch
  orange-bits-2-3-noarch


Related issues

Related to RPM Support - Task #4371: Document how to use the newly added recursive_conservative CLOSED - CURRENTRELEASE Actions
Related to Pulp - Test #4359: 2.18.1 Testing CLOSED - COMPLETE Actions

Associated revisions

Revision 226423b3 View on GitHub
Added by dalley 3 months ago

Fix: Recursive copy doesn't solve rich dependencies

closes: #4375
https://pulp.plan.io/issues/4375

Revision 6b0bc828 View on GitHub
Added by dalley 3 months ago

Fix: Recursive copy doesn't solve rich dependencies

closes: #4375
https://pulp.plan.io/issues/4375

Revision ec99ffa6 View on GitHub
Added by dalley 2 months ago

Fix recursive copy for rich deps, take 3

closes #4375
https://pulp.plan.io/issues/4375

Revision 1334b4cf View on GitHub
Added by dalley 2 months ago

Fix recursive copy for rich deps, take 3

closes #4375
https://pulp.plan.io/issues/4375

History

#1 Updated by CodeHeeler 3 months ago

  • Triaged changed from No to Yes
  • Sprint set to Sprint 48

#2 Updated by dalley 3 months ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to dalley

#3 Updated by dalley 3 months ago

  • Status changed from ASSIGNED to POST

PR: https://github.com/pulp/pulp_rpm/pull/1261

(pulp) [vagrant@pulp2 devel]$ pulp-admin rpm repo copy rpm --from-repo-id deptest --to-repo-id empty2 --str-eq name=Cobbler --recursive                                                                           
This command may be exited via ctrl+c without affecting the request.

[\]
Running...

Copied:
  Cobbler-1-0-noarch
  Scotch-8-10-noarch
  contireau-2-10-noarch
  icecubes-2-3-noarch
  orange-bits-2-3-noarch
  tablespoon-sugar-1-0-noarch

#4 Updated by dalley 3 months ago

  • Platform Release set to 2.18.1

#5 Updated by dalley 3 months ago

  • Status changed from POST to MODIFIED

#6 Updated by kersom 2 months ago

  • Related to Task #4371: Document how to use the newly added recursive_conservative added

#7 Updated by kersom 2 months ago

With the new build 2.18.1b1 that includes this patch. Copying chimpanzee from repo A to repo B, using recursive flag, is copying all its dependencies, even older ones such as: walrus-0.71-1-noarch

pulp-admin login -u admin -p admin
pulp-admin rpm repo create --repo-id zoo --feed https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-unsigned/
pulp-admin rpm repo sync run --repo-id zoo
pulp-admin rpm repo create --repo-id new
pulp-admin rpm repo copy rpm --from-repo-id zoo --to-repo-id new --str-eq name=chimpanzee --recursive

[root@localhost ~]# pulp-admin rpm repo copy rpm --from-repo-id zoo --to-repo-id new --str-eq name=chimpanzee --recursive
This command may be exited via ctrl+c without affecting the request.

[\]
Running...

Copied:
  camel-0.1-1-noarch
  chimpanzee-0.21-1-noarch
  fox-1.1-2-noarch
  shark-0.1-1-noarch
  squirrel-0.1-1-noarch
  stork-0.12-2-noarch
  walrus-0.71-1-noarch
  walrus-5.21-1-noarch
  whale-0.2-1-noarc

2 tests are failing due to this.

rpm.cli.test_copy_units.CopyRecursiveTestCase.test
rpm.api_v2.test_copy.CopyConservativeTestCase.test

What is the expected behaviour here?

#8 Updated by bherring 2 months ago

#9 Updated by dalley 2 months ago

  • Status changed from MODIFIED to POST

#10 Updated by dalley 2 months ago

  • Status changed from POST to MODIFIED

#11 Updated by dalley 2 months ago

#12 Updated by dalley 2 months ago

#13 Updated by dalley 2 months ago

#14 Updated by dalley 2 months ago

#15 Updated by jortel@redhat.com 2 months ago

  • Status changed from MODIFIED to ON_QA

#16 Updated by jortel@redhat.com about 2 months ago

  • Status changed from ON_QA to CLOSED - CURRENTRELEASE

#17 Updated by bmbouter 5 days ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF