Skip to content

Fix parameters that are passed by default for the dnf5 command #1468

@jan-kolarik

Description

@jan-kolarik

We should discuss which parameters should be automatically passed with the dnf5 command when running scenarios. Lot of parameters are now passed and overridden from the CLI. This can have a negative impact on the default user use cases that are not covered by this behavior.

Below is the description of the issue discussed on the team meeting:

There are different methods to prepare the dnf4 and dnf5 commands - “get_dnf5_cmd” and “get_dnf4_cmd”.

Differences in dnf5:

Removed:
disable_plugins = self._get("disable_plugins")
if disable_plugins:
result.append("--disableplugin='*'")

Added:
result.append("--setopt=reposdir=%s" % self.installroot + "/etc/yum.repos.d")
result.append("--setopt=config_file_path=%s" % self.installroot + "/etc/dnf/dnf.conf")
result.append("--setopt=cachedir=%s" % self.installroot + "/var/cache/dnf")

Do we want these differences? Using “–setopt=config_file_path” is problematic (discussion in #1429). Moreover, unnecessary. Because the config files are taken from installroot by default. The same applies to “--setopt=reposdir”. Without “--setopt=cachedir” 8 tests failed. But that might be a bug in dnf5.

PR #1467 thats removes “--setopt=reposdir” and “--setopt=config_file_path”

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions