[Leaplist] FC% yum question ....

Fuzzy Conner fuznacious at yahoo.com
Tue Apr 17 14:50:47 EDT 2007


>> I just got done updating Samba & yum on my FC5 box using yum. I 
>> (supposedly) have my repo files setup to preferentially use my ISP as 
>> the primary repo, since they are 1 of the 20 or 30-odd official RH
>> mirrors & only 1 hop away. However, I could tell from the sloth of
>> downloads (& sporadic FTP errors messages) that yum was using other
>> repo's.

I'm guessing at the end there you might have meant "other servers" as
each repo can include many servers/mirrors.  Those servers will all have
the same RPM's but not the same load or the same connection to the
Internet.

A machine being hosted/maintained/owned by your ISP does not necessarily
mean it will be faster for you.  Also, fewer hops are not always a guarantee
of the best possible speed.  One hop through a modem will download files
slower than two hops through OC3.

Taking that idea into account, you could install yum's "fastestmirror"
plugin from (I think) Fedora Extras.  It will choose whatever seems to be the
fastest mirror, *but* I should mention that it seems to get very confused if
yum is interrupted while downloading and thereafter yum doesn't want to
behave until you 'yum clean' a bit.

[root at laptop ~]# yum install yum-fastestmirror.noarch


~or~

>> How do I tell yum to prefer 1 repo (my ISP), but fall back to the mirror list
>> if necessary ?
(snip, will get to the snipped sentence last)
>> I did RTFMP's, but apparently missed it if it is there :-) .... TIA

I'm thinking you read everything correctly, I did 'man yum' and found only
part of an answer.  Here's the parts of the man page which lead me to more
possible answers for your question.

...from 'man yum'...

--enablerepo=repoidglob
              Enables specific repositories by id or glob that  have  been  disabled  in  the  configuration  file  using  the
              enabled=0 option.
              Configuration Option: enabled

--disablerepo=repoidglob
              Disables specific repositories by id or glob.
              Configuration Option: enabled


So on the command line you could specify repos to enable and disable.
If you have a lot of repos that would get to be very annoying, so....

Notice that man page mentions "the configuration file" --Each repo will
have a configuration file in /etc/yum.repos.d
(names like /etc/yum.repos.d/fedora-core.repo are typical).

Mine are:
[root at laptop ~]# ls /etc/yum.repos.d
fedora-core.repo
fedora-development.repo
fedora-extras-development.repo
fedora-extras.repo
fedora-legacy.repo
fedora-updates.repo
fedora-updates-testing.repo
livna-devel.repo
livna.repo
livna-testing.repo

...and next is one small part of one of the configuration files.
Each of the configuration files will include entries for many
servers and/or a "mirrorlist" which is another list of servers.

[root at laptop ~]# cat /etc/yum.repos.d/livna.repo
[livna]
name=Livna for Fedora Core $releasever - $basearch - Base
baseurl=
        http://rpm.livna.org/fedora/$releasever/$basearch/
        http://livna.cat.pdx.edu/fedora/$releasever/$basearch/
        http://wftp.tu-chemnitz.de/pub/linux/livna/fedora/$releasever/$basearch/
        http://ftp-stud.fht-esslingen.de/pub/Mirrors/rpm.livna.org/fedora/$releasever/$basearch/
        http://mirror.atrpms.net/livna/fedora/$releasever/$basearch/
        ftp://mirrors.tummy.com/pub/rpm.livna.org/fedora/$releasever/$basearch/
failovermethod=priority
#mirrorlist=http://rpm.livna.org/mirrorlist-6
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-livna

I'm thinking there are 3 types of entries there which are relevant to the behavior
you want.  First, the list of servers/mirrors seems pretty straightforward.  Next, I
think the line which says "failovermethod=priority" will allow the behavior you
desire.  That's followed by the third thing I think may be relevant, the line which
contains "mirrorlist" (in this case a URL that will contain a list maintained by, in
this example, the good people at livna.org.  Mine is commented/pounded out in the
example).  I haven't tested this thoroughly, but all of my Google-Fu indicates
that should be the case.

>> Also, how could I get it to report what repo it is using w/o
>> tons of other extraneous info ? 

I was looking for a way to find that in a log file, but I didn't see a way to do that.
I found that I could see lots of extraneous info in my shell but not any of the
necessary info you're looking for, and none of it went to /var/log/yum.log :(


Hoping some of this works for you,
--Fuzzy




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the Leaplist mailing list