Skip to content
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 system_cachedir option does not expand $releasever like the cachedir option does #1828

Open
OndrejPopp opened this issue Nov 3, 2024 · 1 comment
Labels
Priority: MEDIUM Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take

Comments

@OndrejPopp
Copy link

Given that $releasever expands to 41

and the following in /etc/dnf/dnf.conf,

...
cachedir=/packages/dnf/$releasever
system_cachedir=/packages/dnf/$releasever
...

When dnf is run though sudo, so sudo dnf ... it correctly uses /packages/dnf/41 for the cachedir

However when run as the superuser, so
# dnf ...
it uses/creates /packages/dnf/'$releasever' for the cachedir which means that $releasever is not expanded for the system_cachedir option like it is for the cachedir option.

It is possible that more than just $releasever are not expanded.

kind regards,
Ondrej

@pkratoch
Copy link
Contributor

pkratoch commented Nov 4, 2024

Thanks for the report, the issue is valid.

I think it might be due to this:
https://github.com/rpm-software-management/dnf5/blob/main/libdnf5/conf/config_main.cpp#L1318
ConfigMan::load_from_parser first calls the Config::load_from_parser (which does the variable substitution) and then it additionally sets the cachedir to system_cachedir if run as superuser, but without the substitution.

@pkratoch pkratoch added Priority: MEDIUM Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take labels Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: MEDIUM Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take
Projects
None yet
Development

No branches or pull requests

2 participants