Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-protected package depending on a protected package can not be removed #2192

Open
mkoncek opened this issue Jan 14, 2025 · 1 comment
Open
Labels

Comments

@mkoncek
Copy link

mkoncek commented Jan 14, 2025

Basically the same issue as: rpm-software-management/dnf5#1614

Scenario:

Package A is a regular, not protected package. It Requires a package B. Package B is protected.
User installs package A which also installs package B.
Now the user is unable to remove the package A because the transaction would result in a removal of a protected package.

Expected result:

Upon requesting the removal of package A. Package A should be removed without any additional flags given to dnf.
Whether package B is removed is not important.

Reproducer:

$ podman run --rm -it centos:stream9
# dnf -y install java-21-openjdk
Installing dependencies:
...
 systemd-udev                                                        x86_64                             252-48.el9                                                    baseos                                2.0 M
...
# dnf -y remove java-21-openjdk
Error: 
 Problem: The operation would result in removing the following protected packages: systemd-udev
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

This issue causes us problems with automated testing of our packages.

@m-blaha
Copy link
Member

m-blaha commented Jan 14, 2025

Thank you for the report. The issue is valid and there indeed is a bug in dnf preventing removal a package which is the last installed dependent of a protected package.
To get the bug resolved in Centos Stream (and RHEL), I suggest filing a RHEL bug through issues.redhat.com.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants