PDA

View Full Version : Controlling YUM



sunckell
17th March 2005, 05:26 PM
Hey guys,
Got a good one for the people who use YUM out there. Is there a way to tell yum to ignore a package for update?

For example.. I downloaded postfix-2.1.5-4.1.i386.src.rpm and rebuild the rpm with mysql support. How can I tell YUM to ignore that package when I issue a yum update? Not sure if that is even possible?


Thanks for the fyi...

Chad

BandC
17th March 2005, 05:31 PM
If I remember correctly top of my head:

yum --exclude=<package name> update

You should also be able to put the exclude statement in your yum.conf so you don't have to type it everytime. I don't remember the syntax but should be a line like:

exclude=<package name>

BandC
17th March 2005, 05:32 PM
By the way, try:

man yum

and look at the different options.

ucfagls
17th March 2005, 05:48 PM
I posted a reply in another thread (http://www.fedoraforum.org/forum/showpost.php?p=212924&postcount=4) on how to do this by editting your yum.conf to set this globally so you don't have to keep typing the --exclude flag. Adding
exclude=postfix to the [main] section of your /etc/yum.conf will do this, e.g.:
[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
retries=20
obsoletes=1
gpgcheck=1
exclude=postfix

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d

sunckell
17th March 2005, 06:38 PM
ucfagls,
That's what I was looking for.

didn't know:
man yum.conf
was even an option....

Thanks for the help.

ucfagls
17th March 2005, 07:31 PM
You can't man yum.conf, you can man yum however :)