Skip to content

Commit

Permalink
Fix unload plugins behavior without filelists
Browse files Browse the repository at this point in the history
For packages originating outside the System repository, we don't populate the `pkg.files` when running without filelists metadata. Use RPM database as a source instead.
  • Loading branch information
jan-kolarik authored and kontura committed Feb 8, 2024
1 parent 0b4b8cc commit ced5120
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dnf/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import logging
import operator
import os
import rpm
import sys
import traceback

Expand Down Expand Up @@ -193,7 +194,7 @@ def unload_removed_plugins(self, transaction):

# check whether removed plugin file is added at the same time (upgrade of a plugin)
for pkg in transaction.install_set:
erased_plugin_files.difference_update(pkg.files)
erased_plugin_files.difference_update(pkg._header[rpm.RPMTAG_FILENAMES])

# unload plugins that were removed in transaction
for plugin_file in erased_plugin_files:
Expand Down

0 comments on commit ced5120

Please sign in to comment.