Hide Forgot
If /etc/dnf/dnf.conf contains the setting best=1 then dnf builddep will fail for a package BuildRequires: perl-generators will fail with the error Error: Problem: cannot install the best candidate for the job - package perl-generators-1.10-7.el8+1703+3db27f7b.noarch is excluded rather than installing the perl-generators (assuming there aren't any other dependency issues). This was happening when testing a mock rebuild of cyrus-imapd-3.0.7-15.el8.src.rpm but I reproduced it with a dummy package built from the spec file below to avoid dependency issues. Name: testpkg Version: 0 Release: 1%{?dist} Summary: Test Package License: BSD Source0: test.txt BuildRequires: perl-generators %description %prep %setup -q %build %configure make %{?_smp_mflags} %install %make_install %files %doc %changelog
I forgot to mention that I can't reproduce this in Fedora 29 so it looks like it has been fixed there.
Please can you provide a version of dnf, libdnf? Please can you confirm that the issue is reproducible with dnf-4.0.9?
The problem is for the RHEL8 public beta rhel-8.0-beta-1 so dnf-4.0.4-1.el8.noarch libdnf-0.22.0-2.el8.x86_64 libsolv-0.6.35-3.el8.x86_64 which I believe are the latest publicly available versions. I was not able to reproduce it on Fedora 29 which has dnf-4.0.9-2.fc29.noarch libdnf-0.22.3-1.fc29.x86_64 libsolv-0.7.2-1.fc29.x86_64 so the bug may well be fixed if there are later private RHEL8 builds of these packages.
The problem is valid. DNF selector using provide= ignores exclude. The issue cannot be easily fixed, but we have to.
*** This bug has been marked as a duplicate of bug 1677583 ***