mirror of
https://github.com/ansible/ansible.git
synced 2026-08-03 08:03:05 +02:00
Fallbacks for brand new APIs that don't exist in released dnf5 (#83022)
This commit is contained in:
@@ -562,7 +562,11 @@ class Dnf5Module(YumDnf):
|
||||
for repo in repo_query:
|
||||
repo.enable()
|
||||
|
||||
try:
|
||||
sack.load_repos()
|
||||
except AttributeError:
|
||||
# dnf5 < 5.2.0.0
|
||||
sack.update_and_load_enabled_repos(True)
|
||||
|
||||
if self.update_cache and not self.names and not self.list:
|
||||
self.module.exit_json(
|
||||
@@ -594,7 +598,11 @@ class Dnf5Module(YumDnf):
|
||||
self.module.exit_json(msg="", results=results, rc=0)
|
||||
|
||||
settings = libdnf5.base.GoalJobSettings()
|
||||
try:
|
||||
settings.set_group_with_name(True)
|
||||
except AttributeError:
|
||||
# dnf5 < 5.2.0.0
|
||||
settings.group_with_name = True
|
||||
if self.bugfix or self.security:
|
||||
advisory_query = libdnf5.advisory.AdvisoryQuery(base)
|
||||
types = []
|
||||
|
||||
Reference in New Issue
Block a user