-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dnf5 config-manager: Sync w upstream - Add repoid to gener repo name, test warning messages #1429
dnf5 config-manager: Sync w upstream - Add repoid to gener repo name, test warning messages #1429
Conversation
The new upstream code adds the repository id to the generated repository name.
e9e7c7b
to
6df66ec
Compare
Scenario: trying to unset an not set main option (config file is not found) is OK, but a warning is written | ||
Given I delete file "/etc/dnf/dnf.conf" | ||
When I execute dnf with args "config-manager unsetopt best" | ||
Then the exit code is 0 | ||
And stderr is | ||
""" | ||
config-manager: Request to remove main option but config file not found: {context.dnf.installroot}/etc/dnf/dnf.conf | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure what changed, but this scenario fails for me now. The problem is that dnf5 always fails with "Configuration file {config_path} not found" when the config file path is provided on the cli, which is also the case for the ci-dnf-stack tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pkratoch It passed the tests locally on my PC. But you're right. If CI stack runs tests with config file path on cli it should fail. I have to look into it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pkratoch
I looked into it. Why does it pass in local CI? And I saw the command:
dnf5 -y --installroot=/tmp/dnf_ci_installroot_q04aelti --releasever=29 --setopt=module_platform_id=platform:f29 --disableplugin='*' config-manager unsetopt best
This means that the path to the configuration file is not provided on the cli. And that's why it goes right.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. The problem is in the CI stack in the get_dnf5_cmd
method.
Compared to get_dnf4_cmd
, it adds:
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")
I started CI tests without --tags=dnf5
, so get_dnf4_cmd
was used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests pass with the change #1467
The new upstream code rpm-software-management/dnf5#1128