Is there some way to tell yum not to update a particular package, so it gets ignored if I do:
# yum update
![]()
Is there some way to tell yum not to update a particular package, so it gets ignored if I do:
# yum update
![]()
You could add the name of the package to /etc/yum.conf as an exclude line.
That would tell yum to ignore anything that starts with foo. Of course, you could be more specific with the package name too. The exclude line in my yum.conf has kde* in it. I installed KDE last week and decided it is still not for me but I don't want all the KDE stuff updated. On another computer, I don't need OpenOffice (don't use it on that computer) so the exclude line contains openoffice*. All OpenOffice updates are ignored. Here's a sampleCode:exclude=foo*.
On the other computer.Code:[glenn@laptopbeta ~]$ cat /etc/yum.conf [main] cachedir=/var/cache/yum keepcache=0 debuglevel=2 logfile=/var/log/yum.log exactarch=1 obsoletes=1 gpgcheck=1 plugins=1 installonly_limit=3 exclude=kernel-PAE* kde*
After you make the change to the .conf file you can use yum in verbose mode to. It will show that the files are being ignored.Code:exclude=openoffice* kernel-PAE*
Code:yum update -v
Thanks for that informative reply glennzo. Does the exclude keyword work with any/all yum transactions?
Eg. If I use a seperate yum.conf file to install all packages in a group except for those mentioned on an exclude line, like this:
and then do:Code:# yum -y -c /etc/yum/yum-use-all-pkgs.conf groupinstall "group name" # # to install all packages for a particular groupinstall [main] **snip** # use all packages when installing a particular group # group_package_types # List of the following: optional, default, mandatory. Tells yum # which type of packages in groups will be installed when # ’groupinstall’ is called. Default is: default, mandatory # group_package_types = default, mandatory, optional exclude=openoffice*
yum -y -c /etc/yum/yum-use-all-pkgs.conf groupinstall "Office/Productivity"
would that install everything in the above package, apart from OO?
Another question - does the yum.conf file support including other yum.conf type configuration files, like C's #include does?
That would be a handy feature - save having to keep replicating the same stuff in customized yum.conf files.
Hello:
Any transaction that you process through your /etc/yum.conf or your version thereof will be subject to the restrictions/options that you have added.
i.e. your exclusion of openffice.org should do just that.
Take a minute and test it to confirm.
Have a look at the latest man page etc. for yum.conf to find out what options are available to you.
http://yum.baseurl.org/
Seve
Registered Linux User: #384977
.................................................. ............
See the Links below for more Help and those much wanted extras ... :)
Getting a little too deep and complicated for me there CD-RW. Use Seve's advice, use the exclude line since you can have more than 1 exclude, like exclude=foo* bar* kde*, and remember that you can also use exclude on the command line, such as yum --exclude=openoffice* update.
What are you trying to accomplish with yum. What do you want locked, as per your original question?
I wanted to lock a particular package to an earlier version on F10. But this doesn't solve the problem I had with it anyway, as I downgraded it with Smart, and the problem still persists.
Even so, it is handy to know about the excludes stuff for yum.
Is this all documented in 'pinfo yum.conf'
Thanks for that link Seve. I've bookmarked that now. Will be popping over there STS.
![]()
man yum.conf may be a better choice here. There is also a long list of yum plugins. Try, in a terminal,Code:yum list yum*