[Yum] Problematic 'yum' repository paths using --installroot option
Michal Domonkos
mdomonko at redhat.com
Mon Feb 3 15:19:36 UTC 2020
On Thu, Jan 30, 2020 at 5:03 PM Peter Willis <pwillis at aslenv.com> wrote:
>
>
>
> >Well, that is strange; $releasever doesn't seem to be used in any of
> >those URLs. Can you maybe post the output of the error that you're
> >getting while trying to refresh repositories or similar? (e.g. "yum
> >repolist")
>
> Just to clarify, this problem only manifests with the '--installroot' option applied to yum.
> Under normal package management operations everything works fine.
OK, I seem to have missed two key facts when reading your original
email (sorry about that):
* the variable in question is $slreleasever (not yum's built-in $releasever)
* you specified an --installroot
The $slreleasever variable is a user-defined variable specific to
Scientific Linux, stored in the file /etc/yum/vars/slreleasever. Now,
when YUM runs from a custom installroot, it looks for variable
definitions *inside* that installroot. What appears to be the case
here is that there's no /node_root/etc/yum/vars/slreleasever file and
so YUM just doesn't substitute the $slreleasever occurrences within
the baseurl values, and obviously fails thereafter.
That said, for this work, all you have to do is copy the
/etc/yum/vars/slreleasever file to the same location inside your
installroot.
Note that for the built-in $releasever variable, YUM actually allows
the user to specify that the value shall be taken from the host
instead (with --releasever=/ which you also used above). However,
with such custom variables, you have to do the copying/symlinking.
Hope that helps!
Michal
More information about the Yum
mailing list