Dne 30.7.2015 v 10:21 Miroslav Suchý napsal(a):
Dne 30.7.2015 v 09:39 Vít Ondruch napsal(a):
> On related note, I never understood why this is in configs:
>
>
> $ cat /etc/mock/fedora-22-x86_64.cfg | grep \$releasever
>
metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasev...
>
metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-released...
>
metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-testing-...
>
metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-debug-$re...
>
metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-released...
>
metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-testing-...
>
> I mean, is it f22 config or is it some generic config? When it says
> fedora-22, I'd say that the $releasever should be expanded to "22" and
> that should be it. The same applies to $basearch of course. Not
> mentioning that on same places, it is already expanded:
I think it is good when
config_opts['yum.conf']
as closely as possible copy
/etc/yum.repos.d/fedora.repo
In past (2 years ago) it diverged and had different baseurl (while yum.repos.d had
metalink) which lead at least to one bug.
In that case, may be you should introduce $fedorarepofile variable and
use it as a placeholder for /etc/yum.repos.d/fedora.repo. I don't think
copy pasting the information around is the best practice.
And actually, neither I think this is good practice for
/etc/yum.repos.d/fedora.repo, since you cannot query various Fedora
releases at once.
Vít