I’m having trouble with “releasever” in a yum/dnf config file in:
/etc/yum.repos.d/
I want to append characters to the path created from the substitution of “releasever” as in:
[my-test]
name=My Test $releasever - $basearch
baseurl=https://my.test.com/test/$releasever_Beta/$basearch/os/
When used by dnf, dnf bombs out with a Not Found message indicating the path:
, so it appears the variable is not being substituted. I tried adding single or double quotes around just the $releasever, that part of the path, and the whole path. None of those solved it. Any ideas ?
Thanks for reading, but to be clear: that URL does not exist, and this is not a question about whether a specific url exists (as I’ve modified it for this post)
The point is the config file says to use: /$releasever_Beta/ as part of the path, where $releasever should have the substituted value from dnf (either via the normal method it uses or over-ridden via the dnf command line including --releasever=37)
Instead, dnf is copying that part of the url string without substituting, and hence is creating an incorrect path which is not found on my server.
Note:
repo name in the second line is properly substituted, as printed during the dnf run.
removing “_Beta” from the path, also means dnf properly substitutes “37” in (but isn’t the path I require).
Is there some quoting etc that needs to happen to make dnf happy, so that it does do the substitution ?
The problem is not that releasever is not being substituted, it is that releasever_Beta is not an existing variable. It’s not really documented, but looking at the code, it looks like you can enclose variable names in braces: ${releasever}_Beta