Bug 1737469

Summary: builddep ignores module setting
Product: [Fedora] Fedora Reporter: Miroslav Suchý <msuchy>
Component: dnfAssignee: Jaroslav Mracek <jmracek>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: high    
Version: 30CC: amatej, jberan, jmracek, jrohel, mblaha, mhatina, packaging-team-maint, pkratoch, ppisar, rpm-software-management, vmukhame
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libdnf-0.37.2-2.fc30 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-04 06:11:16 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 Miroslav Suchý 2019-08-05 12:54:25 UTC
Description of problem:
Right now, Fedora 30 updates-modular contains perl-interpreter-4:5.28.2-438.module_f30+5096+c4c8b79b.x86_64 and main Fedora contains perl-interpreter-5.28.2-436.fc30.x86_64 - note that 436 < 438.

I was about to release a new version of mock-core-configs which will contain for fedora-30-x86_64.cfg these lines:

[fedora-modular]
name=Fedora Modular $releasever - $basearch
metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-modular-$releasever&arch=$basearch                                                
enabled=0
repo_gpgcheck=0
type=rpm
gpgcheck=1
gpgkey=file:///usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-$releasever-primary
skip_if_unavailable=False

With this setting this command:
  /usr/bin/dnf builddep --installroot /var/lib/mock/fedora-30-x86_64/root/ --releasever 30 --setopt=deltarpm=False --allowerasing --disableplugin=local --disableplugin=spacewalk --disableplugin=local --disableplugin=spacewalk --disableplugin=local --disableplugin=spacewalk /var/lib/mock/fedora-30-x86_64/root//builddir/build/SRPMS/mock-1.4.16-1.git.91.f6afd37.fc30.src.rpm
fails with:
  Error: 
 Problem: cannot install the best candidate for the job
  - package perl-interpreter-4:5.28.2-438.module_f30+5096+c4c8b79b.x86_64 is excluded


This can be right now reproduced with perl-interpreter, but can be triggered any time when updates-modulare will have bigger NEVRA than package in main Fedora.

Note that when I execute:
  /usr/bin/dnf --installroot /var/lib/mock/fedora-30-x86_64/root/ install perl-interpreter 
then module version of this package is correctly ignored and version from main Fedora is installed.


Version-Release number of selected component (if applicable):
dnf-4.2.7-2.fc30.noarch
libdnf-0.35.1-3.fc30.x86_64

How reproducible:
deterministic

Steps to Reproduce:
1. install mock-core-configs package from https://copr.fedorainfracloud.org/coprs/g/mock/mock/build/995161/
2. try to 'mock -r fedora-30-x86_64 mock.src.rpm'


Additional info:

This fix have to be backported to all architectures where Koji/Brew is installed (or bootstrap will have to be used soon).

In the meantime, I will disable updates-modular in mock-core-configs, otherwise, it would have BIG impact for all builds in Koji/Brew.

Comment 1 Jaroslav Mracek 2019-08-05 15:02:12 UTC
Thank you very much for the report. Already 4 months ago we have a fix for it (https://src.fedoraproject.org/rpms/libsolv/pull-request/4), but it was rejected by main administrator of libsolv downstream. Libsolv downstreams that are under dnf team control are patched.

At the present time I have an alternative solution (https://github.com/rpm-software-management/libdnf/pull/692), but we will lose the reports about excluded packages. I have to develop an approach how to keep the reports.

Comment 2 Jaroslav Mracek 2019-09-13 08:24:44 UTC
During testing of https://github.com/rpm-software-management/libdnf/pull/692 I discovered two problems:
1. Excludes of installed packages using solver_lock will not allow to upgrade downgrade locked packages.
   a. It could be positively used by versionlock plugin
   b. It changes behavior of dnf for a lot of operation
   c. I believe that such changes in behavior are suitable for dnf5
2. Reports about solver errors get less informative or more confusing with incorrect conflict.


Original libdnf
==============================================================================================================================================================
udo dnf --installroot /tmp/testsolv --nogpgcheck --releasever 30 --nobest  upgrade -x glibc-common-0:2.29-22.fc30.x86_64 
Dependencies resolved.

 Problem 1: package glibc-all-langpacks-2.29-22.fc30.x86_64 requires glibc-common = 2.29-22.fc30, but none of the providers can be installed
  - cannot install the best update candidate for package glibc-all-langpacks-2.29-9.fc30.x86_64
  - package glibc-common-2.29-22.fc30.x86_64 is excluded
 Problem 2: package glibc-2.29-22.fc30.x86_64 requires glibc-common = 2.29-22.fc30, but none of the providers can be installed
  - cannot install the best update candidate for package glibc-2.29-9.fc30.x86_64
  - package glibc-common-2.29-22.fc30.x86_64 is excluded
====================================================================================================================
 Package                            Architecture          Version                     Repository               Size
====================================================================================================================
Skipping packages with broken dependencies:
 glibc                              x86_64                2.29-22.fc30                upgrades                4.0 M
 glibc-all-langpacks                x86_64                2.29-22.fc30                upgrades                 25 M

Transaction Summary
====================================================================================================================
Skip  2 Packages

Nothing to do.
Complete!

sudo dnf --installroot /tmp/testsolv --nogpgcheck --releasever 30 --nobest  upgrade -x glibc-common
Dependencies resolved.

 Problem 1: package glibc-all-langpacks-2.29-22.fc30.x86_64 requires glibc-common = 2.29-22.fc30, but none of the providers can be installed
  - cannot install the best update candidate for package glibc-all-langpacks-2.29-9.fc30.x86_64
  - package glibc-common-2.29-22.fc30.x86_64 is excluded
 Problem 2: package glibc-2.29-22.fc30.x86_64 requires glibc-common = 2.29-22.fc30, but none of the providers can be installed
  - cannot install the best update candidate for package glibc-2.29-9.fc30.x86_64
  - package glibc-common-2.29-22.fc30.x86_64 is excluded
====================================================================================================================
 Package                            Architecture          Version                     Repository               Size
====================================================================================================================
Skipping packages with broken dependencies:
 glibc                              x86_64                2.29-22.fc30                upgrades                4.0 M
 glibc-all-langpacks                x86_64                2.29-22.fc30                upgrades                 25 M

Transaction Summary
====================================================================================================================
Skip  2 Packages

Nothing to do.
Complete!

===========================================================================================================================================================================


libdnf using solver_lock
===========================================================================================================================================================================


[jmracek@localhost testrepo]$ sudo dnf --installroot /tmp/testsolv --nogpgcheck --releasever 30 --nobest  upgrade -x glibc-common-0:2.29-22.fc30.x86_64 
Dependencies resolved.

 Problem: package glibc-all-langpacks-2.29-22.fc30.x86_64 requires glibc-common = 2.29-22.fc30, but none of the providers can be installed
  - cannot install the best update candidate for package glibc-all-langpacks-2.29-9.fc30.x86_64
  - conflicting requests
====================================================================================================================
 Package                            Architecture          Version                     Repository               Size
====================================================================================================================
Skipping packages with broken dependencies:
 glibc-all-langpacks                x86_64                2.29-22.fc30                upgrades                 25 M

Transaction Summary
====================================================================================================================
Skip  1 Package

Nothing to do.
Complete!


[jmracek@localhost testrepo]$ sudo dnf --installroot /tmp/testsolv --nogpgcheck --releasever 30 --nobest  upgrade --disablerepo=* --repofrompath=upgrades,$(pwd) -x glibc-common
Added upgrades repo from /tmp/testrepo
Last metadata expiration check: 0:07:14 ago on Fri 13 Sep 2019 10:02:07 AM CEST.
Dependencies resolved.

 Problem 1: package glibc-all-langpacks-2.29-22.fc30.x86_64 requires glibc-common = 2.29-22.fc30, but none of the providers can be installed
  - cannot install the best update candidate for package glibc-all-langpacks-2.29-9.fc30.x86_64
  - conflicting requests
 Problem 2: cannot install both glibc-2.29-22.fc30.x86_64 and glibc-2.29-9.fc30.x86_64
  - package glibc-common-2.29-9.fc30.x86_64 requires glibc = 2.29-9.fc30, but none of the providers can be installed
  - cannot install the best update candidate for package glibc-2.29-9.fc30.x86_64
  - conflicting requests
====================================================================================================================
 Package                            Architecture          Version                     Repository               Size
====================================================================================================================
Skipping packages with conflicts:
(add '--best --allowerasing' to command line to force their upgrade):
 glibc                              x86_64                2.29-22.fc30                upgrades                4.0 M
Skipping packages with broken dependencies:
 glibc-all-langpacks                x86_64                2.29-22.fc30                upgrades                 25 M

Transaction Summary
====================================================================================================================
Skip  2 Packages

Nothing to do.
Complete!
===========================================================================================================================================================================

Comment 3 Jaroslav Mracek 2019-10-11 15:50:06 UTC
Thanks a lot to Michael Schroeder, I am able to resolve the issue (https://github.com/rpm-software-management/libdnf/pull/814). Michael implemented POOL_FLAG_WHATPROVIDESWITHDISABLED flag that filtrate best candidates correctly. The patch requires libsolv-0.7.7.

Comment 4 Jaroslav Mracek 2019-10-19 15:43:05 UTC
Patches were backported into Fedora rawhide.

Comment 5 Fedora Update System 2019-11-11 09:43:18 UTC
FEDORA-2019-7cafbe66ba has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-7cafbe66ba

Comment 6 Fedora Update System 2019-11-11 09:43:51 UTC
FEDORA-2019-94393775ec has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2019-94393775ec

Comment 7 Fedora Update System 2019-11-12 03:07:41 UTC
dnf-4.2.15-1.fc30, dnf-plugins-core-4.0.11-1.fc30, dnf-plugins-extras-4.0.8-1.fc30, libdnf-0.37.2-2.fc30, librepo-1.11.0-1.fc30, microdnf-3.0.2-1.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-7cafbe66ba

Comment 8 Fedora Update System 2019-11-13 04:56:10 UTC
dnf-4.2.15-1.fc31, dnf-plugins-core-4.0.11-1.fc31, dnf-plugins-extras-4.0.8-1.fc31, libdnf-0.37.2-2.fc31, librepo-1.11.0-1.fc31, microdnf-3.0.2-1.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-94393775ec

Comment 9 Fedora Update System 2019-11-14 06:46:58 UTC
FEDORA-2019-7cafbe66ba has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-7cafbe66ba

Comment 10 Fedora Update System 2019-11-14 06:50:44 UTC
FEDORA-2019-94393775ec has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2019-94393775ec

Comment 11 Fedora Update System 2019-11-15 03:45:07 UTC
dnf-4.2.15-3.fc30, dnf-plugins-core-4.0.11-1.fc30, dnf-plugins-extras-4.0.8-1.fc30, libdnf-0.37.2-2.fc30, librepo-1.11.0-1.fc30, microdnf-3.0.2-1.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-7cafbe66ba

Comment 12 Fedora Update System 2019-11-15 04:38:39 UTC
dnf-4.2.15-2.fc31, dnf-plugins-core-4.0.11-1.fc31, dnf-plugins-extras-4.0.8-1.fc31, libdnf-0.37.2-2.fc31, librepo-1.11.0-1.fc31, microdnf-3.0.2-1.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-94393775ec

Comment 13 Fedora Update System 2019-11-19 01:35:11 UTC
dnf-4.2.15-2.fc31, dnf-plugins-core-4.0.11-1.fc31, dnf-plugins-extras-4.0.8-1.fc31, libdnf-0.37.2-2.fc31, librepo-1.11.0-1.fc31, microdnf-3.0.2-1.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2019-12-02 19:10:31 UTC
dnf-4.2.15-3.fc30, dnf-plugins-core-4.0.11-1.fc30, dnf-plugins-extras-4.0.8-1.fc30, libdnf-0.37.2-2.fc30, librepo-1.11.0-1.fc30, microdnf-3.0.2-1.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.

Comment 15 Ben Cotton 2020-04-30 20:26:44 UTC
This message is a reminder that Fedora 30 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 30 on 2020-05-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '30'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 30 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.