From f8db3a6609badd3e6c9c6a154e5b07804a055321 Mon Sep 17 00:00:00 2001 From: Jan Kolarik Date: Fri, 8 Dec 2023 09:40:08 +0100 Subject: [PATCH] Add a hint for user on transaction file dependency failure --- dnf/cli/main.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dnf/cli/main.py b/dnf/cli/main.py index 2a7f92d54d..c63baaaada 100644 --- a/dnf/cli/main.py +++ b/dnf/cli/main.py @@ -149,6 +149,13 @@ def cli_run(cli, base): else: msg += _(" or '{}' to use not only best candidate packages").format( "--nobest") + if base._goal.file_dep_problem_present() and 'filelists' not in cli.base.conf.optional_metadata_types: + if not msg: + msg += _("try to add '{}' to load additional filelists metadata").format( + "--setopt=optional_metadata_types=filelists") + else: + msg += _(" or '{}' to load additional filelists metadata").format( + "--setopt=optional_metadata_types=filelists") if msg: logger.info("({})".format(msg)) raise