Project

Profile

Help

Issue #4375

closed

Recursive copy doesn't solve rich dependencies correctly

Added by ttereshc about 5 years ago. Updated about 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
2.18.1
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Sprint 48
Quarter:

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_conservativeCLOSED - CURRENTRELEASEttereshc

Actions
Related to Pulp - Test #4359: 2.18.1 TestingCLOSED - COMPLETEbherringActions
Actions #1

Updated by CodeHeeler about 5 years ago

  • Triaged changed from No to Yes
  • Sprint set to Sprint 48
Actions #2

Updated by dalley about 5 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to dalley
Actions #3

Updated by dalley about 5 years 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

Added by dalley about 5 years ago

Revision 226423b3 | View on GitHub

Fix: Recursive copy doesn't solve rich dependencies

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

Actions #4

Updated by dalley about 5 years ago

  • Platform Release set to 2.18.1

Added by dalley about 5 years ago

Revision 6b0bc828 | View on GitHub

Fix: Recursive copy doesn't solve rich dependencies

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

Actions #5

Updated by dalley about 5 years ago

  • Status changed from POST to MODIFIED
Actions #6

Updated by kersom about 5 years ago

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

Updated by kersom about 5 years 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?

Actions #8

Updated by bherring about 5 years ago

Actions #9

Updated by dalley about 5 years ago

  • Status changed from MODIFIED to POST

Added by dalley about 5 years ago

Revision ec99ffa6 | View on GitHub

Fix recursive copy for rich deps, take 3

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

Added by dalley about 5 years ago

Revision 1334b4cf | View on GitHub

Fix recursive copy for rich deps, take 3

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

Actions #10

Updated by dalley about 5 years ago

  • Status changed from POST to MODIFIED
Actions #11

Updated by dalley about 5 years ago

Actions #12

Updated by dalley about 5 years ago

Actions #13

Updated by dalley about 5 years ago

Actions #14

Updated by dalley about 5 years ago

Actions #15

Updated by jortel@redhat.com about 5 years ago

  • Status changed from MODIFIED to 5
Actions #16

Updated by jortel@redhat.com about 5 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE
Actions #17

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF