LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (http://www.linuxquestions.org/questions/fedora-35/)
-   -   yum | setting priorities for repositories (http://www.linuxquestions.org/questions/fedora-35/yum-%7C-setting-priorities-for-repositories-534424/)

the_gripmaster 03-04-2007 06:10 AM

yum | setting priorities for repositories
 
I created a custom repository in my /etc/yum.repos.d directory named fedora-dvd.repo with the following contents:
Code:

[dvd]
name=Fedora DVD
baseurl=file:///media/FC_6%20i386%20DVD/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora file:///etc/pki/rpm-gpg/RPM-GPG-KEY

However, every time I fire up the yum command it starts by looking the other repositories, starting with livna. Is there a way so that yum first searches the fedora-dvd.repo? I need this because I use a non-permanent Internet connection, and connecting to the internet to use yum every time is a pain.

wmakowski 03-04-2007 10:31 AM

To my knowledge there is no way to set priority on repositories. yum looks at all enabled repositories when executing. What I would do in your case is disable the repositories not located locally using the command line. This will force yum to look at the DVD repository on your local drive. For example if you had five repos core, dvd, extras, livna, updates and four of them were on the net you could use the command...
Code:

yum --disablerepo=core,extras,livna,updates <command> <package>
Bill

the_gripmaster 03-04-2007 01:45 PM

Quote:

Originally Posted by wmakowski
To my knowledge there is no way to set priority on repositories. yum looks at all enabled repositories when executing. What I would do in your case is disable the repositories not located locally using the command line. This will force yum to look at the DVD repository on your local drive. For example if you had five repos core, dvd, extras, livna, updates and four of them were on the net you could use the command...
Code:

yum --disablerepo=core,extras,livna,updates <command> <package>
Bill

Thanks...although I am having another problem now, your solution has helped.


All times are GMT -5. The time now is 10:19 AM.