|
|
@ -496,7 +496,7 @@ class Dnf5Module(YumDnf):
|
|
|
|
conf.config_file_path = self.conf_file
|
|
|
|
conf.config_file_path = self.conf_file
|
|
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
base.load_config_from_file()
|
|
|
|
base.load_config()
|
|
|
|
except RuntimeError as e:
|
|
|
|
except RuntimeError as e:
|
|
|
|
self.module.fail_json(
|
|
|
|
self.module.fail_json(
|
|
|
|
msg=str(e),
|
|
|
|
msg=str(e),
|
|
|
@ -536,7 +536,8 @@ class Dnf5Module(YumDnf):
|
|
|
|
log_router = base.get_logger()
|
|
|
|
log_router = base.get_logger()
|
|
|
|
global_logger = libdnf5.logger.GlobalLogger()
|
|
|
|
global_logger = libdnf5.logger.GlobalLogger()
|
|
|
|
global_logger.set(log_router.get(), libdnf5.logger.Logger.Level_DEBUG)
|
|
|
|
global_logger.set(log_router.get(), libdnf5.logger.Logger.Level_DEBUG)
|
|
|
|
logger = libdnf5.logger.create_file_logger(base)
|
|
|
|
# FIXME hardcoding the filename does not seem right, should libdnf5 expose the default file name?
|
|
|
|
|
|
|
|
logger = libdnf5.logger.create_file_logger(base, "dnf5.log")
|
|
|
|
log_router.add_logger(logger)
|
|
|
|
log_router.add_logger(logger)
|
|
|
|
|
|
|
|
|
|
|
|
if self.update_cache:
|
|
|
|
if self.update_cache:
|
|
|
@ -561,7 +562,7 @@ class Dnf5Module(YumDnf):
|
|
|
|
for repo in repo_query:
|
|
|
|
for repo in repo_query:
|
|
|
|
repo.enable()
|
|
|
|
repo.enable()
|
|
|
|
|
|
|
|
|
|
|
|
sack.update_and_load_enabled_repos(True)
|
|
|
|
sack.load_repos()
|
|
|
|
|
|
|
|
|
|
|
|
if self.update_cache and not self.names and not self.list:
|
|
|
|
if self.update_cache and not self.names and not self.list:
|
|
|
|
self.module.exit_json(
|
|
|
|
self.module.exit_json(
|
|
|
@ -593,7 +594,7 @@ class Dnf5Module(YumDnf):
|
|
|
|
self.module.exit_json(msg="", results=results, rc=0)
|
|
|
|
self.module.exit_json(msg="", results=results, rc=0)
|
|
|
|
|
|
|
|
|
|
|
|
settings = libdnf5.base.GoalJobSettings()
|
|
|
|
settings = libdnf5.base.GoalJobSettings()
|
|
|
|
settings.group_with_name = True
|
|
|
|
settings.set_group_with_name(True)
|
|
|
|
if self.bugfix or self.security:
|
|
|
|
if self.bugfix or self.security:
|
|
|
|
advisory_query = libdnf5.advisory.AdvisoryQuery(base)
|
|
|
|
advisory_query = libdnf5.advisory.AdvisoryQuery(base)
|
|
|
|
types = []
|
|
|
|
types = []
|
|
|
|