Skip to content

Commit

Permalink
{pre,post}-transaction-actions: fix package files filtering regression
Browse files Browse the repository at this point in the history
According to DNF User's FAQ, starting with Fedora 40 filelists metadata
became optional. This caused a regression in pre and post transaction
actions plugins which rely on this information. Let's request filelists
metadata whenever the pre or post transaction actions plugin is enabled.

= changelog =
msg: Fix package files filtering in pre and post-transaction-actions plugins
type: bugfix
  • Loading branch information
kszczek committed Jun 12, 2024
1 parent 2ad7d93 commit d4b00e4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugins/post-transaction-actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ def __init__(self, base, cli):
self.logger = logger

def config(self):
if "filelists" not in self.base.conf.optional_metadata_types:
self.base.conf.optional_metadata_types += ["filelists"]

conf = self.read_config(self.base.conf)
if conf.has_section("main"):
if conf.has_option("main", "actiondir"):
Expand Down
3 changes: 3 additions & 0 deletions plugins/pre-transaction-actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ def __init__(self, base, cli):
self.logger = logger

def config(self):
if "filelists" not in self.base.conf.optional_metadata_types:
self.base.conf.optional_metadata_types += ["filelists"]

conf = self.read_config(self.base.conf)
if conf.has_section("main"):
if conf.has_option("main", "actiondir"):
Expand Down

0 comments on commit d4b00e4

Please sign in to comment.