Bug 1995630

Summary: yum tries to install packages with incompatible architecture when multilib_policy=all
Product: Red Hat Enterprise Linux 8 Reporter: Jan Stodola <jstodola>
Component: yumAssignee: Jaroslav Mracek <jmracek>
Status: CLOSED ERRATA QA Contact: Martin Banas <mbanas>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 8.5CC: james.antill, mbanas, pkratoch
Target Milestone: betaKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dnf-4.7.0-5.el8 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 1996681 (view as bug list) Environment:
Last Closed: 2022-05-10 15:23:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jan Stodola 2021-08-19 14:11:16 UTC
Description of problem:
When multilib_policy=all is specified in yum.conf, yum tries to install even packages with incompatible architecture and fails.

Version-Release number of selected component (if applicable):
yum-4.7.0-2.el8

How reproducible:
always

Steps to Reproduce:
1. create a repository containing a package for multiple architectures, where at least one is not compatible with the running system, for example x86_64, i686 and aarch64
2. create a repo file for the new repository
3. echo multilib_policy=all >> /etc/yum.conf
4. yum install $multilib_package

Actual results:

# yum install zsh
Failed to set locale, defaulting to C.UTF-8
Updating Subscription Management repositories.
Unable to read consumer identity

This system is not registered with an entitlement server. You can use subscription-manager to register.

Last metadata expiration check: 0:08:51 ago on Thu Aug 19 09:53:59 2021.
Error: 
 Problem: conflicting requests
  - package zsh-5.5.1-8.el8.aarch64 does not have a compatible architecture
  - nothing provides libdl.so.2(GLIBC_2.17)(64bit) needed by zsh-5.5.1-8.el8.aarch64
  - nothing provides libm.so.6(GLIBC_2.17)(64bit) needed by zsh-5.5.1-8.el8.aarch64
  - nothing provides ld-linux-aarch64.so.1()(64bit) needed by zsh-5.5.1-8.el8.aarch64
  - nothing provides ld-linux-aarch64.so.1(GLIBC_2.17)(64bit) needed by zsh-5.5.1-8.el8.aarch64
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
# uname -m
x86_64
#

Expected results:
As written in man yum.conf, only packages with compatible architectures are installed:

multilib_policy
Controls how multilib packages are treated during install operations. Can  either  be  "best"  (the
default)  for the depsolver to prefer packages which best match the system's architecture, or "all"
to install all available packages with compatible architectures.

Additional info:
The same problem exists on RHEL-9 with yum-4.7.0-2.el9

Comment 1 Jan Stodola 2021-08-23 13:11:40 UTC
RHEL-9 clone: bug 1996681

Comment 2 Jaroslav Mracek 2021-09-06 10:45:08 UTC
I created PR that improves documentation https://github.com/rpm-software-management/dnf/pull/1789.

AC: It is only the man page change therefore no tests are required.

Comment 9 errata-xmlrpc 2022-05-10 15:23:43 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (dnf bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:2051