Bug 1410947 - Error message by dnf when removing dependency of protected package is not useful
Summary: Error message by dnf when removing dependency of protected package is not useful
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 29
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ---
Assignee: Jaroslav Mracek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-06 23:23 UTC by Neal Gompa
Modified: 2018-09-24 14:54 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-09-24 14:54:17 UTC
Type: Bug


Attachments (Terms of Use)

Description Neal Gompa 2017-01-06 23:23:18 UTC
Description of problem:
When attempting to remove a package that is a dependency of a protected package, the error returned does not make it obvious the reason it is blocked is because it would result in the removal of a protected package.

Version-Release number of selected component (if applicable):
2.0.0-1.mga6 (= 2.0.0-1.fc26)

How reproducible:
Always

Steps to Reproduce:
1. Run sudo dnf remove gnupg2

Actual results:
Error: package python3-gpgme-0.3-9.mga6.x86_64 requires libgpgme.so.11()(64bit), but none of the providers can be installed
  - package python3-dnf-2.0.0-1.mga6.noarch requires python3-gpgme, but none of the providers can be installed
  - package lib64gpgme11-1.8.0-8.mga6.x86_64 requires gnupg2 >= 1.9.6, but none of the providers can be installed
  - package dnf-2.0.0-1.mga6.noarch requires python3-dnf = 2.0.0-1.mga6, but none of the providers can be installed
  - conflicting requests
  - problem with installed package dnf-2.0.0-1.mga6.noarch

Expected results:
Some detailed error showing the dependency chain resulting in showing that it would cause the removal of dnf, which is not allowed as it is a protected package.

Additional info:
This error should be just as reproducible in Fedora Rawhide, as gnupg2 is an indirect dependency of dnf, and dnf declares itself protected by default.

Comment 1 Honza Silhan 2017-01-09 15:25:50 UTC
Thanks for the report. It could be improved by extending set of protected packages recursively by it's dependencies before checking the set for removals.

Comment 2 Neal Gompa 2017-01-09 22:26:34 UTC
Another aspect of it would be to make it so that the error statement doesn't look like it's trying to install something. Initially I was confused by the error because it looked like an install dependency error (even though I was attempting to remove a package). The problem statements printed should be in the correct context (that is, showing the broken reverse dependency chain from the proposed removal action).

So I would say this and Honza's suggestion in Comment 1 would essentially solve the problem.

Comment 3 Fedora End Of Life 2017-02-28 10:54:17 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 4 Jaroslav Mracek 2017-06-02 18:52:37 UTC
I created pull request (https://github.com/rpm-software-management/libdnf/pull/295) that should improve the behavior. Unfortunately it can report only one protected package in transaction. I do not know what was supposed solution, but my solution was not an easy fix. Have a fun with testing.

Comment 5 Fedora End Of Life 2018-05-03 08:17:54 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 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 '26'.

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 26 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.

Comment 6 Jan Kurik 2018-08-14 11:14:47 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle.
Changing version to '29'.

Comment 7 Jaroslav Mracek 2018-09-24 14:54:17 UTC
Problem fixed in libdnf-0.10.0


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