pulp_rpm icon indicating copy to clipboard operation
pulp_rpm copied to clipboard

Dependency solver of advanced copy workflow should not check host architecture

Open GeorgFleig opened this issue 2 years ago • 0 comments

Version

  • core: 3.43.1
  • rpm: 3.24.0
  • Running pulp in one container on an ARM system.

Describe the bug The dependency solver of the advanced copy workflow erroneously checks the architecture of the RPM packages against the system architecture of the Pulp host. This check should not happen.

Trying to copy a noarch package with dependencies on a x86_64 package (dependency-lib) fails:

Problems Encountered:
=====================
nothing provides dependency-lib = 0:12.1.2-21 needed by mypackage:0.0.1.noarch

Packages transferred:
=====================

Even though the list of Packages transferred is empty, the requested package mypackage:0.0.1.noarch gets copied, not its dependencies though.

Trying to copy a x86_64 package (with or without dependencies):

Problems Encountered:
=====================
package foo-bar:14.12-2.x86_64 does not have a compatible architecture

Packages transferred:
=====================

Even though the list of Packages transferred is empty, the requested package foo-bar:14.12-2.x86_64 gets copied, not its dependencies though.

To Reproduce

  • run Pulp on ARM architecture and set up repo with x86_64 RPMs (the issue should arise as well when Pulp is run on x86_64 and you use ARM RPMs)
  • use advanced copy workflow to copy this RPM from one repo to another

Expected behavior Dependency solver should not care about the hosts architecture at all.

Additional context

  • https://github.com/pulp/pulp_rpm/blob/3.24.0/pulp_rpm/app/depsolving.py#L949
  • https://github.com/openSUSE/libsolv/blob/master/src/problems.c#L1396

GeorgFleig avatar Jan 26 '24 14:01 GeorgFleig