Bug 1665722 - dnf builddep can fail with best=1
Summary: dnf builddep can fail with best=1
Keywords:
Status: CLOSED DUPLICATE of bug 1677583
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: dnf
Version: 8.0
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: rc
: 8.0
Assignee: Jaroslav Mracek
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-01-13 09:43 UTC by Michael Young
Modified: 2019-05-22 05:14 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-02-18 22:02:22 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)

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 ***


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