Man that was quick. I'm pasting my questions and their response exactly as it is. <br><br><br>This is my question to the Yum list about why they use variables in the yum config. Maybe it applies to us and maybe it doesn't.<br>
Grant<br>---------------------------------------------------<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
I've been using SmartPM for some time on CentOS machines and in the SmartPM mailing list we have a conversation<br>
that's not hot but a bit<br>
warm about whether we should add support for variable names in the Smart config file.  It really come down to<br>
"That's the way Yum does it so<br>
we should do it too" on one side to "not all decisions are smart ones" on the opposing side.<br>
<br>
So I'm here to find out what the advantage of having a line like this<br>
<br>
baseurl=<a href="http://mirror.centos.org/centos/$releasever/centosplus/$basearch/" target="_blank">http://mirror.centos.org/centos/$releasever/centosplus/$basearch/</a><br>
<br>
As apposed to having it like this.<br>
<br>
baseurl=<a href="http://mirror.centos.org/centos/5/centosplus/i386/" target="_blank">http://mirror.centos.org/centos/5/centosplus/i386/</a><br>
</blockquote>
<br>
<br>
it means you can have one config file for all arches. Which, for a long
time, was a big deal in the fedora/red hat world. fedora-release and
redhat-release are noarch pkgs.<div class="Ih2E3d"><br>
<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
and just update the file (/etc/yum.repos.d/repofile.repo) if the repository or the version/arch changes?<br>
</blockquote>
<br></div>
you can't always update those files. They're %config(noreplace). So the
user/admin can update them but the distro cannot. - well not w/any
confidence.<div class="Ih2E3d"><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
This isn't flame bait as I'm arguing the side of having variables but others have put up a really good defense on<br>
the "They're not necessary" side<br>
of things.<br>
</blockquote>
<br></div>
We use them all the time for simplicity of expanding out for other arches too.<br>
<br>
you can use the same config for i386 and x86_64 today and if you add
ia64 or ppc tomorrow they'll still work, you just add the dir on the
repo side.<div class="Ih2E3d"><br>
<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
So I'm asking how are these set and does YUM use them just because that's the way it's always done it or is there<br>
a really strong case for them?<br>
</blockquote>
<br></div>
the above is how they are used.<br>
<br>
They are set internal to config.py in yum. look at:<br>
rpmUtils/arch.py in yum's source at how basearch/arch is determined.<br>
<br>
The mechanism for determining arch is not native to yum - it comes up
from anaconda/rpm originally and some of it is god-awful-ugly. But it
is what it is.<br>
<br>
Hope this helps.<br><font color="#888888">
<br>
-sv</font><br>