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

Fixes for RHEL-15902 #2085

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions dnf/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -815,9 +815,11 @@ def _goal2transaction(self, goal):
if erasures:
remaining_installed_query = self.sack.query(flags=hawkey.IGNORE_EXCLUDES).installed()
remaining_installed_query.filterm(pkg__neq=erasures)
remaining_installed_query.apply()
for pkg in erasures:
if remaining_installed_query.filter(name=pkg.name):
remaining = remaining_installed_query[0]
tmp_remaining_installed_query = remaining_installed_query.filter(name=pkg.name, arch=pkg.arch)
if tmp_remaining_installed_query:
remaining = tmp_remaining_installed_query[0]
ts.get_reason(remaining)
self.history.set_reason(remaining, ts.get_reason(remaining))
self._ds_callback.pkg_added(pkg, 'e')
Expand Down
9 changes: 3 additions & 6 deletions doc/command_ref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -499,10 +499,7 @@ Autoremove Command

``dnf [options] autoremove``

Removes all "leaf" packages from the system that were originally installed as dependencies of user-installed packages, but which are no longer required by any such package.

Packages listed in :ref:`installonlypkgs <installonlypkgs-label>` are never automatically removed by
this command.
Removes all packages from the system that were originally installed as dependencies of user-installed packages, but which are no longer required by any such package.

``dnf [options] autoremove <spec>...``

Expand Down Expand Up @@ -798,8 +795,8 @@ transactions and act according to this information (assuming the
the current state of RPMDB, it will not undo the transaction.

``dnf history userinstalled``
Show all installonly packages, packages installed outside of DNF and packages not
installed as dependency. I.e. it lists packages that will stay on the system when
Show all packages installed by user, installed from a group or a module profile, and packages
installed outside of DNF. I.e. it lists packages that will stay on the system when
:ref:`\autoremove_command-label` or :ref:`\remove_command-label` along with
`clean_requirements_on_remove` configuration option set to True is executed. Note the same
results can be accomplished with ``dnf repoquery --userinstalled``, and the repoquery
Expand Down