Bug 2119691
Summary: | Lack of "leaves options" in the DNF replacement for package-cleanup | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Christophe Besson <cbesson> |
Component: | dnf | Assignee: | Jaroslav Mracek <jmracek> |
Status: | CLOSED DUPLICATE | QA Contact: | swm-qe |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | 8.6 | CC: | amkulkar, james.antill, jcastran |
Target Milestone: | rc | Keywords: | FutureFeature, Triaged |
Target Release: | --- | Flags: | pm-rhel:
mirror+
|
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2023-03-20 11:17: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
Christophe Besson
2022-08-19 07:45:46 UTC
Thank you very much for the report. There are two different approaches how to manage leave packages on the system. The first of all - using reason - internal information how package was installed to the system. The information is used for removal operation or by `dnf autoremove` to remove unused dependencies. Or using leave plugin that compute dependencies tree and then report the top packages as leave. For systems that are deployed and maintain by dnf (including Anaconda) the first approach is sufficient. To check all reasons for installed packages you can use 'dnf repoquery --installed --qf "%{name}.%{arch} %{reason}"' As you can see it is not easy subject therefore we need more specific information what the customer want to achieved rather how it was achieved in the past. The reason can give the same result most of the time, but it's not the same. If the user installed all packages with a glob (dnf install ipg-*), the reason will be "user" for the 3 pkgs. Whereas the previous command printed only "ipg-foo" in both cases because it has no dependency. --unneeded gives only a subset (the libs) of `package-cleanup --leaves --all`. Indeed the DNF leave plugin would help to provide the same feature but AFAICS it does not seem shipped with RHEL 8. I can see leaves.py in the src.rpm, but the file is not included in the dnf-plugins-core rpm or in a separate pkg (python3-dnf-leaves?) Leave plugin is not yet available in RHEL but it is available in Fedora - therefore for testing you can use a fedora build (documentation - https://dnf-plugins-core.readthedocs.io/en/latest/leaves.html). We've got a request to delivery the leave plugin to RHEL -Bug 2134638 - Please enable the leaves and show-leaves DNF plugins. If you think that this is a solution, I will close the bug as a duplicate. Do you need anything specific for testing for leave plugin? What we could - add leave and show-leaves plugin to RHEL9 What would be very difficult - add a new option, plugin to RHEL8 - to late in lifecycle of RHEL8 I have suggestion for RHEL8 If you use `dnf install ipg-*` all of packages matching `ipg-*` are marked as user installed. If user don't want to handle them as user installed - it is possible to mark them as dependency - `dnf mark remove ipg-*` and then mark some of the packages from them as a user installed `dnf mark install ipg-<something>`. See documentation - https://dnf.readthedocs.io/en/latest/command_ref.html#mark-command-label If the workaround is ok and the solution for RHEL9 is not acceptable for the customer - then I will close it as wontfix. May I ask you to share with me your preferences how to handle the bug report? Because there is no response I am closing the bug as duplicate with bug requesting Leave and show leave plugin in RHEL9. *** This bug has been marked as a duplicate of bug 2134638 *** Sorry for the late reply, it has been suggested to the customer last week but no feedback. It is indeed late for the RHEL 8 lifecycle. |