Issue
I am hosting 2 repositories (myrepo-main and AppStream) on a local server. The myrepo-main hosts mysql commercial rpms and some other packages.
Unless I disable the AppStream repo, most of the mysql packages are not visible.
$ sudo dnf list | grep ^mysql
mysql-commercial-libs-compat.x86_64 5.7.29-1.1.el7 myrepo-main
Disabling the AppStream repo allows me to see the mysql packages in the repo.
$ sudo dnf --disablerepo=AppStream --enablerepo=myrepo* list | grep ^mysql
mysql-commercial-client.x86_64 5.7.29-1.1.el7 myrepo-main
mysql-commercial-common.x86_64 5.7.29-1.1.el7 myrepo-main
mysql-commercial-libs.x86_64 5.7.29-1.1.el7 myrepo-main
mysql-commercial-libs-compat.x86_64 5.7.29-1.1.el7 myrepo-main
mysql-commercial-server.x86_64 5.7.29-1.1.el7 myrepo-main
Other packages in the repo are visible in myrepo without disabling the AppStream repo
$ sudo dnf list | grep myrepo
jre1.8.x86_64 1.8.0_211-fcs @myrepo-main
tomcat.x86_64 8.5.41-2 @myrepo-main
mysql-commercial-libs-compat.x86_64 5.7.29-1.1.el7 myrepo-main
I have excluded the mysql packages from the AppStream repo on the client.
[AppStream]
name=FW-CentOS-$releasever - AppStream
baseurl=http://192.168.20.230/repos/x86/8/AppStream/AppStream
gpgcheck=1
enabled=1
gpgkey=http://192.168.20.230/repos/x86/8/RPM-GPG-KEY-FWRepo
priority=98
exclude=mysql-server,mysql-common,mysql-devel,mysql-errmsg,mysql-libs,mysql-test,mysql,mariadb,mariadb-server
[myrepo-main]
name=MyRepo Main
baseurl=http://192.168.20.230/repos/x86/8/fairwarning/fwpackages/
enabled=1
gpgcheck=1
gpgkey=http://192.168.20.230/repos/x86/8/fairwarning/fwpackages/RPM-GPG-KEY-FWRepo
priority=1
I have tried :
dnf clean all
rm -rf /var/cache/dnf/
I also tried using reposync to create AppStream without metadata, deleting all mysql rpms and generating the metadata using createrepo_c. This allowed me to see the mysql packages in myrepo, but other packages had issues with the generated metadata and would not install.
We have a similar configuration for our CentOS6 hosts which works without issue. I suspect this is some feature of dnf or AppStream.
Solution
From the answer of user EOhm:
This is needed, from what I understand, because of the new modules system introduced with EL8. The pgdg packages are filtered by default if dnf detects that they provides things that are also in modules but are not packaged as appropriate modules themselves.
So there are multiple solutions:
- As stated, add
module_hotfixes=true
on the repo definition, which allows DNF to update or install packages also provided as modules (even if not already installed) - Just use
dnf --disablerepo AppStream
as OP did, which can be tedious - Disable the module which is causing problem with
dnf module disable xxx
(I don't know the name of the problematic module here)
Answered By - rolf82 Answer Checked By - David Marino (WPSolving Volunteer)