Skip to content

Commit

Permalink
backends dnf: add load_filelists implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
gotmax23 committed Feb 13, 2024
1 parent 5c0bfd4 commit ed87b42
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/fedrq/backends/dnf/backend/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,17 @@ def set_var(self, key: str, value: t.Any) -> None:
raise KeyError(f"{key} is not a valid substitution")
self.set(key, value)

def load_filelists(self, enable: bool = True) -> None:
# Old versions of dnf always load filelists
if not hasattr(self.conf, "optional_metadata_types"):
return
types: list[str] = self.conf.optional_metadata_types
if enable:
types.append("filelists")
return
while "filelists" in types:
types.remove("filelists")

def load_changelogs(self, enable: bool = True) -> None:
for repo in self.base.repos.iter_enabled():
repo.load_metadata_other = enable
Expand Down

0 comments on commit ed87b42

Please sign in to comment.