RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1780363 - When excludepkgs is set for one repository, package from a different repository is ignored as well
Summary: When excludepkgs is set for one repository, package from a different reposito...
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: dnf
Version: 8.4
Hardware: x86_64
OS: Linux
Target Milestone: rc
: 8.0
Assignee: Marek Blaha
QA Contact: Radek Bíba
Depends On:
TreeView+ depends on / blocked
Reported: 2019-12-05 18:56 UTC by Geoff Montee
Modified: 2021-02-16 13:52 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2020-04-20 06:27:30 UTC
Type: Bug
Target Upstream Version:

Attachments (Terms of Use)

Description Geoff Montee 2019-12-05 18:56:08 UTC
Description of problem:

The mariadb-server package included in RHEL/CentOS 8 currently has Epoch=3, while MariaDB's RHEL/CentOS 8 package currently has Epoch=0. This means that the default package in RHEL/CentOS 8 takes precedence over MariaDB's packages. This is being tracked by the following MariaDB bug:


I tried to work around this by setting the following in the configuration for the AppStream repo:


However, when this is set, dnf ignores the mariadb-server package in the AppStream repository, *and* it ignores the MariaDB-server package in MariaDB's repository.

Version-Release number of selected component (if applicable):

$ sudo rpm -qa | grep dnf

How reproducible:

Reproducible 100% of the time.

Steps to Reproduce:

1. Setup MariaDB's yum repository:

curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash


2. Confirm that the MariaDB yum repository is setup and the MariaDB-server package is present:

$ sudo yum --repo='mariadb-main' repoquery --qf="%{NAME} %{EPOCH} %{VERSION} %{RELEASE}" MariaDB-server
Last metadata expiration check: 0:05:18 ago on Thu 05 Dec 2019 06:43:23 PM UTC.
MariaDB-server 0 10.4.10 1.el8
MariaDB-server 0 10.4.7 1.el8
MariaDB-server 0 10.4.8 1.el8

3. Confirm that the mariadb-server package in the RHEL/CentOS 8 AppStream repository takes precedence:

$ sudo yum repoquery --qf="%{NAME} %{EPOCH} %{VERSION} %{RELEASE}" MariaDB-server
Last metadata expiration check: 0:00:07 ago on Thu 05 Dec 2019 06:51:19 PM UTC.
mariadb-server 3 10.3.11 1.module+el8+2765+cfa4f87b
mariadb-server 3 10.3.11 2.module+el8+2885+7b8bb354
mariadb-server 3 10.3.17 1.module+el8.1.0+3974+90eded84

4. We only want to download MariaDB packages from MariaDB's yum repository, so now we should add excludepkgs=mariadb* to the repository configuration for the AppStream repository.

i.e. on my EC2 system, that means opening up /etc/yum.repos.d/redhat-rhui.repo, and setting the following configuration:

name=Red Hat Enterprise Linux 8 for $basearch - AppStream from RHUI (RPMs)

4. Now, try to search for the MariaDB-server package again:

$ sudo yum info MariaDB-server
Last metadata expiration check: 0:00:10 ago on Thu 05 Dec 2019 06:52:03 PM UTC.
Error: No matching Packages to list

Actual results:

The MariaDB-server package is not found.

Expected results:

The MariaDB-server package from MariaDB's repository should be used.

Additional info:

Comment 1 Marek Blaha 2019-12-09 16:22:26 UTC
The situation is pretty much the same as in the bug https://bugzilla.redhat.com/show_bug.cgi?id=1777393
Again the problem is that dnf (according to the modularity specifications - see https://dnf.readthedocs.io/en/latest/command_ref.html#modular-filtering) filters out all packages "from inactive module streams, as well as non-modular packages with the same name *OR PROVIDES* as a package from an active module stream". So this is not DNF bug, but the modularity feature.

Specifically for the mariadb:

1. list all MariaDB-server packages regardless the modularity
$ dnf --setopt=*.module_hotfixes=1 repoquery MariaDB-server

2. list all provides of the MariaDB-server-0:10.4.10-1.el8.x86_64 package
$ dnf --setopt=*.module_hotfixes=1 repoquery --provides MariaDB-server-0:10.4.10-1.el8.x86_64
MariaDB-server = 10.4.10-1.el8
MariaDB-server(x86-64) = 10.4.10-1.el8
config(MariaDB-server) = 10.4.10-1.el8
config(mysql-server) = 10.4.10-1.el8
mysql-server = 10.4.10-1.el8
mysql-server(x86-64) = 10.4.10-1.el8

3. find out which modules contain artifacts with the same name as any of those provides (use only those provides that could possibly be package names):
$ dnf module provides MariaDB MariaDB-server MySQL MySQL-server msqlormysql mysql-server
Module   : mysql:8.0:8000020190807131617:f8e95b4e:x86_64
Profiles : server
Repo     : rhel-AppStream
Summary  : MySQL Module

4. list all the artifacts of the mysql:8.0 stream:
$ dnf module info mysql:8.0
Name             : mysql
Stream           : 8.0 [d][x]
Version          : 8000020190807131617
Context          : f8e95b4e
Architecture     : x86_64
Profiles         : client, server [d]
Default profiles : server
Repo             : rhel-AppStream
Summary          : MySQL Module
Description      : MySQL is a multi-user, multi-threaded SQL database server. MySQL is a client/server implementation consisting of a server daemon (mysqld) and many different client programs and libraries. The base package contains the standard MySQL client programs and generic MySQL files.
Requires         : platform:[el8]
Artifacts        : mecab-0:0.996-1.module+el8.0.0+3898+e09bb8de.9.src
                 : mecab-0:0.996-1.module+el8.0.0+3898+e09bb8de.9.x86_64
                 : mecab-debuginfo-0:0.996-1.module+el8.0.0+3898+e09bb8de.9.x86_64
                 : mecab-debugsource-0:0.996-1.module+el8.0.0+3898+e09bb8de.9.x86_64
                 : mecab-ipadic-0:
                 : mecab-ipadic-0:
                 : mecab-ipadic-EUCJP-0:
                 : mysql-0:8.0.17-3.module+el8.0.0+3898+e09bb8de.src
                 : mysql-0:8.0.17-3.module+el8.0.0+3898+e09bb8de.x86_64
                 : mysql-common-0:8.0.17-3.module+el8.0.0+3898+e09bb8de.x86_64
                 : mysql-debuginfo-0:8.0.17-3.module+el8.0.0+3898+e09bb8de.x86_64
                 : mysql-debugsource-0:8.0.17-3.module+el8.0.0+3898+e09bb8de.x86_64
                 : mysql-devel-0:8.0.17-3.module+el8.0.0+3898+e09bb8de.x86_64
                 : mysql-devel-debuginfo-0:8.0.17-3.module+el8.0.0+3898+e09bb8de.x86_64
                 : mysql-errmsg-0:8.0.17-3.module+el8.0.0+3898+e09bb8de.x86_64
                 : mysql-libs-0:8.0.17-3.module+el8.0.0+3898+e09bb8de.x86_64
                 : mysql-libs-debuginfo-0:8.0.17-3.module+el8.0.0+3898+e09bb8de.x86_64
                 : mysql-server-0:8.0.17-3.module+el8.0.0+3898+e09bb8de.x86_64
                 : mysql-server-debuginfo-0:8.0.17-3.module+el8.0.0+3898+e09bb8de.x86_64
                 : mysql-test-0:8.0.17-3.module+el8.0.0+3898+e09bb8de.x86_64
                 : mysql-test-debuginfo-0:8.0.17-3.module+el8.0.0+3898+e09bb8de.x86_64

4. the stream "8.0" of the module mysql contains artifact mysql-server-0:8.0.17-3.module+el8.0.0+3898+e09bb8de.x86_64. The stream is default and that means it is active => all non-modular packages with either name mysql-server or provide mysql-server are going to be filtered out. The package MariaDB-server provides "mysql-server" and thus will be filtered out.

5. to be able to install MariaDB-server package, we need to disable mysql module (and also the module mariadb for similar reasons)
$ dnf module disable mysql mariadb

6. package MariaDB-server is available
$ dnf info MariaDB-server
Available Packages
Name         : MariaDB-server
Version      : 10.4.10
Release      : 1.el8
Architecture : x86_64
Size         : 26 M
Source       : MariaDB-server-10.4.10-1.el8.src.rpm
Repository   : mariadb-main
Summary      : MariaDB: a very fast and robust SQL database server
URL          : http://mariadb.org
License      : GPLv2
Description  : MariaDB: a very fast and robust SQL database server

Comment 4 Marek Blaha 2020-04-20 06:27:30 UTC
Given that DNF behaves exactly according to modularity specification I'm closing this as "not a bug".
In case you didn't consider the explanation from comment#1 sufficient please do not hesitate to reopen the bug.

Note You need to log in before you can comment on or make changes to this bug.