Project

Profile

Help

Issue #4375

Recursive copy doesn't solve rich dependencies correctly

Added by ttereshc almost 2 years ago. Updated almost 2 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 - CURRENTRELEASE

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>
Related to Pulp - Test #4359: 2.18.1 TestingCLOSED - COMPLETE<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

Associated revisions

Revision 226423b3 View on GitHub
Added by dalley almost 2 years 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 almost 2 years 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 almost 2 years 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 almost 2 years ago

Fix recursive copy for rich deps, take 3

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

History

#1 Updated by CodeHeeler almost 2 years ago

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

#2 Updated by dalley almost 2 years ago

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

#3 Updated by dalley almost 2 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

#4 Updated by dalley almost 2 years ago

  • Platform Release set to 2.18.1

#5 Updated by dalley almost 2 years ago

  • Status changed from POST to MODIFIED

#6 Updated by kersom almost 2 years ago

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

#7 Updated by kersom almost 2 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?

#8 Updated by bherring almost 2 years ago

#9 Updated by dalley almost 2 years ago

  • Status changed from MODIFIED to POST

#10 Updated by dalley almost 2 years ago

  • Status changed from POST to MODIFIED

#11 Updated by dalley almost 2 years ago

#12 Updated by dalley almost 2 years ago

#13 Updated by dalley almost 2 years ago

#14 Updated by dalley almost 2 years ago

#15 Updated by jortel@redhat.com almost 2 years ago

  • Status changed from MODIFIED to 5

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

  • Status changed from 5 to CLOSED - CURRENTRELEASE

#17 Updated by bmbouter almost 2 years ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF