Project

Profile

Help

Issue #8110

closed

Wrong deps are copied to the repo when using "recursive" option to copy rpms

Added by hyu almost 4 years ago. Updated almost 4 years ago.

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

Description

## Cloned from bugzilla 1917076 ##

Description of problem: Pulp solves the wrong dependent packages which will cause conflict to other packages.

Steps to Reproduce:

  1. Enable the pulp debug log level and restart Pulp services
  2. On Satellite Web UI, create a content view name "cv_rhel_8", set the "solve dependencies" to "Yes"
  3. Add "Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)" repository to the CV.
  4. Create a filter to include all errata until 1st Oct 2020.
  5. Create a filter to include all rpms without errata.
  6. Publish the content view
  7. Register a rhel 8 host to the CV.
  8. Run dnf update on the host.

Actual results: Update with dependencies issue as below:

dnf update

Updating Subscription Management repositories. Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs) 2.8 MB/s | 21 MB 00:07
Last metadata expiration check: 0:00:08 ago on Thu 14 Jan 2021 08:40:47 PM AEST. Error: Problem 1: package bluez-obexd-5.50-3.el8.x86_64 requires bluez(x86-64) = 5.50-3.el8, but none of the providers can be installed

  • cannot install both bluez-5.52-1.el8.x86_64 and bluez-5.50-3.el8.x86_64
  • cannot install the best update candidate for package bluez-obexd-5.50-3.el8.x86_64
  • cannot install the best update candidate for package bluez-5.50-3.el8.x86_64 Problem 2: problem with installed package bluez-obexd-5.50-3.el8.x86_64
  • package bluez-obexd-5.50-3.el8.x86_64 requires bluez-libs(x86-64) = 5.50-3.el8, but none of the providers can be installed
  • cannot install both bluez-libs-5.52-1.el8.x86_64 and bluez-libs-5.50-3.el8.x86_64
  • cannot install the best update candidate for package bluez-libs-5.50-3.el8.x86_64 (try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

The following libsolv error is printed in the journal log.

pulp: pulp_rpm.plugins.importers.yum.pulp_solv:DEBUG: [6c1e9667] (30103-60480) Encountered problems solving: cannot install both kpatch-0:0.6.1-noarch.noarch and kpatch-0:0.6.1-noarch.noarch, cannot install both libnl3-0:3.4.0-i686.i686 and libnl3-0:3.4.0-i686.i686, cannot install both krb5-pkinit-0:1.17-x86_64.x86_64 and krb5-pkinit-0:1.17-x86_64.x86_64, cannot install both NetworkManager-libnm-1:1.20.0-x86_64.x86_64 and NetworkManager-libnm-1:1.20.0-x86_64.x86_64, cannot install both systemd-libs-0:239-x86_64.x86_64 and systemd-libs-0:239-x86_64.x86_64, cannot install both glibc-langpack-ro-0:2.28-x86_64.x86_64 and glibc-langpack-ro-0:2.28-x86_64.x86_64, cannot install both glibc-langpack-so-0:2.28-x86_64.x86_64 and glibc-langpack-so-0:2.28-x86_64.x86_64, cannot install both glibc-langpack-sk-0:2.28-x86_64.x86_64 and glibc-langpack-sk-0:2.28-x86_64.x86_64, cannot install both libsss_idmap-0:2.0.0-x86_64.x86_64 and libsss_idmap-0:2.0.0-x86_64.x86_64, cannot install both python3-test-0:3.6.8-x86_64.x86_64 and python3-test-0:3.6.8-x86_64.x86_64, cannot install both glibc-langpack-br-0:2.28-x86_64.x86_64 and glibc-langpack-br-0:2.28-x86_64.x86_64, cannot install both xfsprogs-0:5.0.0-i686.i686 and xfsprogs-0:5.0.0-i686.i686, cannot install both glibc-langpack-li-0:2.28-x86_64.x86_64 and glibc-langpack-li-0:2.28-x86_64.x86_64, cannot install both libcomps-devel-0:0.1.11-x86_64.x86_64 and libcomps-devel-0:0.1.11-x86_64.x86_64, cannot install both iwl5000-firmware-0:8.83.5.1_1-noarch.noarch and iwl5000-firmware-0:8.83.5.1_1-noarch.noarch, cannot install both glibc-langpack-ar-0:2.28-x86_64.x86_64 and glibc-langpack-ar-0:2.28-x86_64.x86_64, cannot install both glibc-langpack-gv-0:2.28-x86_64.x86_64 and glibc-langpack-gv-0:2.28-x86_64.x86_64, cannot install both libxml2-0:2.9.7-x86_64.x86_64 and libxml2-0:2.9.7-x86_64.x86_64, cannot install both samba-client-libs-0:4.10.4-x86_64.x86_64 and samba-client-libs-0:4.10.4-x86_64.x86_64, cannot install both xfsprogs-devel-0:5.0.0-x86_64.x86_64 and xfsprogs-devel-0:5.0.0-x86_64.x86_64, cannot install both libfdisk-devel-0:2.32.1-x86_64.x86_64 and libfdisk-devel-0:2.32.1-x86_64.x86_64, cannot install both glibc-langpack-it-0:2.28-x86_64.x86_64 and glibc-langpack-it-0:2.28-x86_64.x86_64, cannot install both sssd-client-0:2.2.0-x86_64.x86_64 and sssd-client-0:2.2.0-x86_64.x86_64, cannot install both glibc-langpack-en-0:2.28-x86_64.x86_64 and glibc-langpack-en-0:2.28-x86_64.x86_64, cannot install both gnutls-0:3.6.8-i686.i686 and gnutls-0:3.6.8-i686.i686, cannot install both libcurl-minimal-0:7.61.1-x86_64.x86_64 and libcurl-minimal-0:7.61.1-x86_64.x86_64, cannot install both uuidd-0:2.32.1-x86_64.x86_64 and uuidd-0:2.32.1-x86_64.x86_64, cannot install both dnf-data-0:4.2.17-noarch.noarch and dnf-data-0:4.2.17-noarch.noarch, cannot install both cups-libs-1:2.2.6-x86_64.x86_64 and cups-libs-1:2.2.6-x86_64.x86_64, cannot install both sssd-kcm-0:2.2.0-x86_64.x86_64 and sssd-kcm-0:2.2.0-x86_64.x86_64, cannot install both platform-python-0:3.6.8-x86_64.x86_64 and platform-python-0:3.6.8-x86_64.x86_64, cannot install both libipa_hbac-0:2.0.0-i686.i686 and libipa_hbac-0:2.0.0-i686.i686, cannot install both glibc-devel-0:2.28-x86_64.x86_64 and glibc-devel-0:2.28-x86_64.x86_64, cannot install both libtirpc-0:1.1.4-i686.i686 and libtirpc-0:1.1.4-i686.i686, cannot install both dhcp-relay-12:4.3.6-x86_64.x86_64 and dhcp-relay-12:4.3.6-x86_64.x86_64, cannot install both python3-perf-0:4.18.0-x86_64.x86_64 and python3-perf-0:4.18.0-x86_64.x86_64, cannot install both lua-libs-0:5.3.4-i686.i686 and lua-libs-0:5.3.4-i686.i686, cannot install both glibc-langpack-sgs-0:2.28-x86_64.x86_64 and glibc-langpack-sgs-0:2.28-x86_64.x86_64, cannot install both iwl3160-firmware-1:25.30.13.0-noarch.noarch and iwl3160-firmware-1:25.30.13.0-noarch.noarch, cannot install both realmd-0:0.16.3-x86_64.x86_64 and realmd-0:0.16.3-x86_64.x86_64, cannot install both cyrus-sasl-plain-0:2.1.27-x86_64.x86_64....

Expected results:

  1. No problem in libsolv while publishing the CV.
  2. Either nothing to update (depend on the rhel8 version) or update packages without problem.

Additional info: While checking the above log, you should notice that the "nevr" of the rpm is not correct, such as "iwl3160-firmware-1:25.30.13.0-noarch.noarch". This is causing many same rpm versions are parsing to libsolv. Libsolv complains that it can't install the same version of rpms like below:

"cannot install both iwl3160-firmware-1:25.30.13.0-noarch.noarch and iwl3160-firmware-1:25.30.13.0-noarch.noarch" "cannot install both libtirpc-0:1.1.4-i686.i686 and libtirpc-0:1.1.4-i686.i686"

Below is the offending line in the code. It sets the "r" to "arch", but it should be set to "release".

https://github.com/pulp/pulp_rpm/blob/2-master/plugins/pulp_rpm/plugins/importers/yum/pulp_solv.py#L227

Amending this line seems to solve the issue. Libsolv doesn't complain any problem. The libsolve transaction (transaction.newsolvables() method) pulls the correct number of rpms (which is equal or more than to the associating rpms)


Related issues

Copied to RPM Support - Issue #8114: Wrong deps are copied to the repo when using "recursive" option to copy rpmsCLOSED - CURRENTRELEASEdalleyActions
Actions #2

Updated by pulpbot almost 4 years ago

  • Status changed from NEW to POST
Actions #3

Updated by dalley almost 4 years ago

  • Project changed from Pulp to RPM Support
Actions #6

Updated by dalley almost 4 years ago

  • Copied to Issue #8114: Wrong deps are copied to the repo when using "recursive" option to copy rpms added
Actions #7

Updated by ggainey almost 4 years ago

  • Platform Release set to 2.21.5
  • Triaged changed from No to Yes

Added by hyu almost 4 years ago

Revision d62c61f2 | View on GitHub

Fix pulp depsolv issue when copy rpms with recursive config

Pulp solves wrong dependencies because wrong evr is parsed to the solvable unit.

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

Actions #8

Updated by hyu almost 4 years ago

  • Status changed from POST to MODIFIED

Added by hyu almost 4 years ago

Revision 2974124a | View on GitHub

Fix pulp depsolv issue when copy rpms with recursive config

Pulp solves wrong dependencies because wrong evr is parsed to the solvable unit.

closes: #8110 https://pulp.plan.io/issues/8110 (cherry picked from commit d62c61f20b737df5a78c7cffda1c173df0f2b58c)

Actions #10

Updated by pmoravec@redhat.com almost 4 years ago

A complementary & mandatory PR: https://github.com/pulp/pulp_rpm/pull/1926 (dunno why pulp bot didnt commented the same)

Added by hyu almost 4 years ago

Revision af9087ee | View on GitHub

Fix typo in the debug message

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

Added by pmoravec@redhat.com almost 4 years ago

Revision 3b82d8df | View on GitHub

Fix pulp depsolv issue when copy rpms with recursive config 2/2

This completes the commit d62c61f where pulp solves wrong dependencies because wrong evr is parsed to the solvable unit.

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

Signed-off-by: Pavel Moravec

Added by pmoravec@redhat.com almost 4 years ago

Revision 2b5119bd | View on GitHub

Fix pulp depsolv issue when copy rpms with recursive config 2/2

This completes the commit d62c61f where pulp solves wrong dependencies because wrong evr is parsed to the solvable unit.

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

Signed-off-by: Pavel Moravec (cherry picked from commit 3b82d8dfe2dc81f2716e86ec5ea91adbecc539cd)

Added by hyu almost 4 years ago

Revision 156d39c5 | View on GitHub

Fix typo in the debug message

closes: #8110 https://pulp.plan.io/issues/8110 (cherry picked from commit af9087ee80a2a9856197ea8e67d89d5ed47069b5)

Actions #12

Updated by ggainey almost 4 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF