Bug 1665722

Summary: dnf builddep can fail with best=1
Product: Red Hat Enterprise Linux 8 Reporter: Michael Young <m.a.young>
Component: dnfAssignee: Jaroslav Mracek <jmracek>
Status: CLOSED DUPLICATE QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: unspecified Docs Contact:
Priority: low    
Version: 8.0CC: conathan, dmach, james.antill, jmracek, m.a.young
Target Milestone: rcKeywords: Triaged
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-02-18 22:02:22 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 Michael Young 2019-01-13 09:43:15 UTC
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

Comment 1 Michael Young 2019-01-13 09:45:35 UTC
I forgot to mention that I can't reproduce this in Fedora 29 so it looks like it has been fixed there.

Comment 2 Jaroslav Mracek 2019-01-14 12:27:41 UTC
Please can you provide a version of dnf, libdnf?

Please can you confirm that the issue is reproducible with dnf-4.0.9?

Comment 3 Michael Young 2019-01-14 12:45:54 UTC
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.

Comment 4 Jaroslav Mracek 2019-02-18 21:58:33 UTC
The problem is valid. DNF selector using provide= ignores exclude. The issue cannot be easily fixed, but we have to.

Comment 5 Jaroslav Mracek 2019-02-18 22:02:22 UTC

*** This bug has been marked as a duplicate of bug 1677583 ***