- From: Matthew Kent <
>
- To:
- Subject: [chef] Re: yum_package provider does not honor 'options "--disablerepo"' when searching available provides?
- Date: Tue, 31 Jan 2012 13:44:59 -0800
On Tue, Jan 31, 2012 at 11:46 AM, Brad Knowles
<
>
wrote:
>
Folks,
>
>
So, for our upcoming production systems (CentOS 5.6 & chef-client 0.10.8),
>
we have built our own local copy of monit 5.3.2 (5.3.2-1, to be precise),
>
and put that on our internal repo. We want to force our machines to use
>
this explicit version of monit, and not anything else. However, recently
>
rpmforge posted 5.3.2-2, and now even though we try to lock down the
>
explicit version we want, yum_package keeps trying to install
>
monit-5.3.2-2.el5.rf instead of our own monit-5.3.2-1.x86_64.rpm.
>
>
>
Doing a "yum info monit" will come up with the reference to the rpmforge
>
version, but at least there we can provide a "--disablerepo=rpmforge" and
>
get it to find the version that we have on our internal repo server.
>
>
Trying to do the same thing within the yum_package provider fails, however
>
-- when searching the available provides, it still finds
>
monit-5.3.2-2.el5.rf (which is only on rpmforge), but then when it goes to
>
try to install this version it will apparently honor the
>
"--disablerepo=rpmforge" option, and then the package doesn't actually get
>
installed.
>
>
>
Okay, so I could rebuild our version of the package (which I know works the
>
way we want), and bump the version number. That will work right up to the
>
point where rpmforge does this to me again. I'm looking for a better
>
solution to this problem. Any ideas?
>
With a specific version I believe so long as yum can see it you should
be able to install it with Chef. Check that it can by adding by
adding showdupesfromrepos=1 to yum.conf and running 'yum list
available'. Note this only applies to :install, if you are passing
:upgrade you are going to get the latest version.
The proper solution for this though is to run (and love) yum
priorities. Give your local repository a higher priority than rpmforge
- your version will effectively mask the newer one. This is a better
long term solution then someone accidentally upgrading it down the
road.
--
Matthew Kent |
http://magoazul.com
Archive powered by MHonArc 2.6.16.