Bug 1643109

Summary: dnf should not list redundant entries in "Skipping packages with conflicts:" formatted output
Product: [Fedora] Fedora Reporter: Jan Pokorný [poki] <jpokorny>
Component: dnfAssignee: Jaroslav Rohel <jrohel>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 31CC: jmracek, jrohel, mblaha, mhatina, packaging-team-maint, pkratoch, rpm-software-management, vmukhame
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dnf-4.2.15-2.fc31 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-05 07:12:08 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 Jan Pokorný [poki] 2018-10-25 13:58:11 UTC
# dnf update --assumeno -x <dnf-unrelated-stuff> | col
>  Problem 1: package python2-dnf-4.0.4-1.fc30.noarch requires dnf-data = 4.0.4-1.fc30, but none of the providers can be installed
>   - cannot install both dnf-data-4.0.4-2g6275b768.fc30.noarch and dnf-data-4.0.4-1.fc30.noarch
>   - cannot install both dnf-data-4.0.4-1.fc30.noarch and dnf-data-4.0.4-2g6275b768.fc30.noarch
>   - cannot install the best update candidate for package python2-dnf-4.0.4-1.fc30.noarch
>   - cannot install the best update candidate for package dnf-data-4.0.4-1.fc30.noarch
>  Problem 2: package python2-hawkey-0.22.0-5.fc30.x86_64 requires libdnf(x86-64) = 0.22.0-5.fc30, but none of the providers can be installed
>   - cannot install both libdnf-0.22.0-9gc5e67963.fc30.x86_64 and libdnf-0.22.0-5.fc30.x86_64
>   - cannot install both libdnf-0.22.0-5.fc30.x86_64 and libdnf-0.22.0-9gc5e67963.fc30.x86_64
>   - cannot install the best update candidate for package python2-hawkey-0.22.0-5.fc30.x86_64
>   - cannot install the best update candidate for package libdnf-0.22.0-5.fc30.x86_64
>  Problem 3: package python2-librepo-1.9.2-1.fc30.x86_64 requires librepo(x86-64) = 1.9.2-1.fc30, but none of the providers can be installed
>   - cannot install both librepo-1.9.2-2gc670c6b.fc30.x86_64 and librepo-1.9.2-1.fc30.x86_64
>   - cannot install both librepo-1.9.2-1.fc30.x86_64 and librepo-1.9.2-2gc670c6b.fc30.x86_64
>   - cannot install the best update candidate for package python2-librepo-1.9.2-1.fc30.x86_64
>   - cannot install the best update candidate for package librepo-1.9.2-1.fc30.x86_64
>  Problem 4: package python2-libdnf-0.22.0-5.fc30.x86_64 requires libdnf(x86-64) = 0.22.0-5.fc30, but none of the providers can be installed
>   - cannot install both libdnf-0.22.0-9gc5e67963.fc30.x86_64 and libdnf-0.22.0-5.fc30.x86_64
>   - cannot install both libdnf-0.22.0-5.fc30.x86_64 and libdnf-0.22.0-9gc5e67963.fc30.x86_64
>   - package python3-hawkey-0.22.0-9gc5e67963.fc30.x86_64 requires libdnf(x86-64) = 0.22.0-9gc5e67963.fc30, but none of the providers can be installed
>   - cannot install the best update candidate for package python3-hawkey-0.22.0-5.fc30.x86_64
>   - cannot install the best update candidate for package python2-libdnf-0.22.0-5.fc30.x86_64
>  Problem 5: problem with installed package python2-dnf-4.0.4-1.fc30.noarch
>   - package python2-dnf-4.0.4-1.fc30.noarch requires dnf-data = 4.0.4-1.fc30, but none of the providers can be installed
>   - cannot install both dnf-data-4.0.4-2g6275b768.fc30.noarch and dnf-data-4.0.4-1.fc30.noarch
>   - cannot install both dnf-data-4.0.4-1.fc30.noarch and dnf-data-4.0.4-2g6275b768.fc30.noarch
>   - package python3-dnf-4.0.4-2g6275b768.fc30.noarch requires dnf-data = 4.0.4-2g6275b768.fc30, but none of the providers can be installed
>   - cannot install the best update candidate for package python3-dnf-4.0.4-1.fc30.noarch
>  Problem 6: problem with installed package python2-libdnf-0.22.0-5.fc30.x86_64
>   - package python2-libdnf-0.22.0-5.fc30.x86_64 requires libdnf(x86-64) = 0.22.0-5.fc30, but none of the providers can be installed
>   - cannot install both libdnf-0.22.0-9gc5e67963.fc30.x86_64 and libdnf-0.22.0-5.fc30.x86_64
>   - cannot install both libdnf-0.22.0-5.fc30.x86_64 and libdnf-0.22.0-9gc5e67963.fc30.x86_64
>   - package python3-libdnf-0.22.0-9gc5e67963.fc30.x86_64 requires libdnf(x86-64) = 0.22.0-9gc5e67963.fc30, but none of the providers can be installed
>   - cannot install the best update candidate for package python3-libdnf-0.22.0-5.fc30.x86_64
>  Problem 7: problem with installed package python2-librepo-1.9.2-1.fc30.x86_64
>   - package python2-librepo-1.9.2-1.fc30.x86_64 requires librepo(x86-64) = 1.9.2-1.fc30, but none of the providers can be installed
>   - cannot install both librepo-1.9.2-2gc670c6b.fc30.x86_64 and librepo-1.9.2-1.fc30.x86_64
>   - cannot install both librepo-1.9.2-1.fc30.x86_64 and librepo-1.9.2-2gc670c6b.fc30.x86_64
>   - package python3-librepo-1.9.2-2gc670c6b.fc30.x86_64 requires librepo(x86-64) = 1.9.2-2gc670c6b.fc30, but none of the providers can be installed
>   - cannot install the best update candidate for package python3-librepo-1.9.2-1.fc30.x86_64
> Operation aborted.
> Last metadata expiration check: 0:35:14 ago on Thu 25 Oct 2018 02:09:47 PM CEST.
> Dependencies resolved.
> ================================================================================
>  Package		    ArchVersion		       Repository			 Size
> ================================================================================
> Upgrading:
>  libdnf-debuginfo	    x86_640.22.0-9gc5e67963.fc30 rpmsoftwaremanagement-dnf-nightly 5.6 M
>  libdnf-debugsource	    x86_640.22.0-9gc5e67963.fc30 rpmsoftwaremanagement-dnf-nightly 433 k
>  python3-hawkey-debuginfo   x86_640.22.0-9gc5e67963.fc30 rpmsoftwaremanagement-dnf-nightly 421 k
>  python3-libdnf-debuginfo   x86_640.22.0-9gc5e67963.fc30 rpmsoftwaremanagement-dnf-nightly 4.2 M
> Skipping packages with conflicts:
> (add '--best --allowerasing' to command line to force their upgrade):
>  dnf-data		    noarch4.0.4-2g6275b768.fc30	 rpmsoftwaremanagement-dnf-nightly 28 k
>  libdnf			    x86_640.22.0-9gc5e67963.fc30 rpmsoftwaremanagement-dnf-nightly 520 k
>  librepo		    x86_641.9.2-2gc670c6b.fc30	 rpmsoftwaremanagement-dnf-nightly 78 k
>  librepo		    x86_641.9.2-2gc670c6b.fc30	 rpmsoftwaremanagement-dnf-nightly 78 k
>  librepo		    x86_641.9.2-2gc670c6b.fc30	 rpmsoftwaremanagement-dnf-nightly 78 k
>  librepo		    x86_641.9.2-2gc670c6b.fc30	 rpmsoftwaremanagement-dnf-nightly 78 k
>  librepo		    x86_641.9.2-2gc670c6b.fc30	 rpmsoftwaremanagement-dnf-nightly 78 k
>  librepo		    x86_641.9.2-2gc670c6b.fc30	 rpmsoftwaremanagement-dnf-nightly 78 k
>  librepo		    x86_641.9.2-2gc670c6b.fc30	 rpmsoftwaremanagement-dnf-nightly 78 k
>  librepo		    x86_641.9.2-2gc670c6b.fc30	 rpmsoftwaremanagement-dnf-nightly 78 k
>  librepo		    x86_641.9.2-2gc670c6b.fc30	 rpmsoftwaremanagement-dnf-nightly 78 k
>  librepo		    x86_641.9.2-2gc670c6b.fc30	 rpmsoftwaremanagement-dnf-nightly 78 k
>  librepo		    x86_641.9.2-2gc670c6b.fc30	 rpmsoftwaremanagement-dnf-nightly 78 k
>  librepo		    x86_641.9.2-2gc670c6b.fc30	 rpmsoftwaremanagement-dnf-nightly 78 k
>  librepo		    x86_641.9.2-2gc670c6b.fc30	 rpmsoftwaremanagement-dnf-nightly 78 k
>  librepo		    x86_641.9.2-2gc670c6b.fc30	 rpmsoftwaremanagement-dnf-nightly 78 k
>  librepo		    x86_641.9.2-2gc670c6b.fc30	 rpmsoftwaremanagement-dnf-nightly 78 k
   ^ this
> Skipping packages with broken dependencies:
>  python3-dnf		    noarch4.0.4-2g6275b768.fc30	 rpmsoftwaremanagement-dnf-nightly 379 k
>  python3-hawkey		    x86_640.22.0-9gc5e67963.fc30 rpmsoftwaremanagement-dnf-nightly 69 k
>  python3-libdnf		    x86_640.22.0-9gc5e67963.fc30 rpmsoftwaremanagement-dnf-nightly 574 k
>  python3-librepo	    x86_641.9.2-2gc670c6b.fc30	 rpmsoftwaremanagement-dnf-nightly 44 k
> 
> Transaction Summary
> ================================================================================
> Upgrade	  4 Packages
> Skip	 21 Packages
> 
> Total download size: 11 M
> Operation aborted.

You can also notice a perhaps intended cosmetic issue of missing visual
separator between "Arch" and "Version" field (I've observed that several
times already, may be present "since beginning").  If there are missing
characters in respect to "terminal column width"), a space separator
between digits and the unit of size should be sacrificed earlier
("5.6 M" -> "5.6M"), for instance.

But more unexpected is that when some packages get skipped in the
operations, they shall really be presented as a set of them
(as opposed to a list of possibly repeated items for no good reason).

# rpm -q python3-dnf libdnf librepo python3-hawkey
> python3-dnf-4.0.4-1.fc30.noarch
> libdnf-0.22.0-5.fc30.x86_64
> librepo-1.9.2-1.fc30.x86_64
> python3-hawkey-0.22.0-5.fc30.x86_64

Comment 1 Ben Cotton 2019-08-13 16:51:43 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to '31'.

Comment 2 Ben Cotton 2019-08-13 18:55:23 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to 31.

Comment 3 Jaroslav Rohel 2019-09-19 13:51:04 UTC
> But more unexpected is that when some packages get skipped in the
operations, they shall really be presented as a set of them
(as opposed to a list of possibly repeated items for no good reason).

But there is a good reason. There really were 21 skipped packages. So, this is not a DNF bug.
What you saw were just duplicated lines since there were 15 different packages with identical nevra. Yes it is confusing. But this is not a DNF problem that some repositories contains a lot of packages with identical nevra. It is a "feature" of the repository.

It is not clear what the proper behavior should be. If you have any idea, please share.

Comment 4 Jaroslav Rohel 2019-09-24 11:11:29 UTC
I thought about the problem and made PR https://github.com/rpm-software-management/dnf/pull/1488

It silently hides other packages with identical nevra. It is not ideal. But the install command choose only one package too and does not install all packages with the same nevra.

Comment 5 Fedora Update System 2019-11-11 09:43:30 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:44:02 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:50 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:17 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:47:08 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:54 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:15 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:47 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:19 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:40 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.