[Yum] Repository Prioritization

Ryan Tomayko rtomayko at naeblis.cx
Sat Aug 2 03:41:28 UTC 2003


I'm new, yum rocks, yadda yadda yadda...

I've been prioritizing repositories using a naming scheme for repo ids
in yum.conf (see below) where the first two characters of the id is a
number from 00 to 99 and then I have pkgpolicy set to "last" instead of
"latest". The result is that I'm able to say repo A rpms always get
pulled before repo B rpms when the same rpm is available in more than 1
repo. I'm sure this has come up before but for those who wonder wtf I
need to do this for, freshrpms and fedora are constantly conflicting
back and forth on a large number of rpms and I have a personal repo I
want to trump both.

This seems to be working pretty effectively but has some minor
drawbacks.

1. yum.conf just seems kind of inelegant. 
2. /var/cache/yum looks silly with all the number prefixes. (picky??
bhaa!)
3. Changing a priority requires changing a repo id which means I have to
do some manual work in /var/cache/yum. Otherwise I get stuck with
orphaned headers and have to reget all headers from the repository.

Am I way out in left field here or is this pretty much how others are
handling this?

Has anyone suggested putting a priority attribute on repositories?


<< BEGIN /etc/yum.conf
[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=last
tolerant=1
diskspacecheck=0

[50-naeblis]
name=naeblis.cx
baseurl=http://naeblis.cx/rpm/redhat/9
gpgcheck=0

[40-freshrpms]
name=freshrpms.net
baseurl=http://ayo.freshrpms.net/redhat/9/i386/freshrpms
        ftp://ftp.au.freshrpms.net/pub/freshrpms/ayo/redhat/9/i386
        ftp://ftp.fr2.freshrpms.net/linux/freshrpms/ayo/redhat/9/i386


[40-jpackage-rh9]
name=jpackage redhat 9
gpgcheck=1
baseurl=http://aleron.dl.sourceforge.net/sourceforge/jpackage/direct_download/1.5/redhat-9/free

[40-jpackage-generic]
name=jpackage generic
gpgcheck=1
baseurl=http://aleron.dl.sourceforge.net/sourceforge/jpackage/direct_download/1.5/generic/free

[30-fedora-stable]
name=fedora stable
baseurl=http://download.fedora.us/fedora/redhat/9/i386/yum/stable

[21-redhat-updates]
name=redhat updates
failovermethod=priority
baseurl=http://mirror.dulug.duke.edu/pub/yum-repository/redhat/updates/9

[20-redhat-os]
name=redhat os
failovermethod=priority
baseurl=http://mirror.dulug.duke.edu/pub/yum-repository/redhat/9/i386
        
[10-fedora-testing]
name=fedora testing
baseurl=http://download.fedora.us/fedora/redhat/9/i386/yum/testing

[10-fedora-unstable]
name=fedora unstable
baseurl=http://download.fedora.us/fedora/redhat/9/i386/yum/unstable

>> END /etc/yum.conf


Thanks,
- Ryan <rtomayko at naeblis.cx>




More information about the Yum mailing list