[chef] package resource does not consider option "--disablerepo=somerepo"


Chronological Thread 
  • From: Max Gorbul < >
  • To:
  • Subject: [chef] package resource does not consider option "--disablerepo=somerepo"
  • Date: Sat, 6 Oct 2012 00:11:46 -0700

Hello,

Question: Is there a way to install newer version of yum package using package resource without re-prioritizing yum repos on the box ?

Problem description:

I have two repos enabled epel (priority 3) and rpmforge (priority 5).
epel repo has older version of the package 

# Epel
~]$ yum info python-twisted-core | grep Version -A 1
Version    : 2.5.0
Release    : 4.el5

# Rpmforge
~]$ yum --disablerepo=epel info python-twisted-core | grep Version -A 1
Version    : 8.2.0
Release    : 1.el5.rf

I define resource the following way:

package "python-twisted-core" do
  action :install
  options "--disablerepo=epel"
end

but chef-client installs the older version which it found in epel (repo with high priority). It does not take the option into consideration when looks up for the available package version.

Even if I specify the exact version like that

package "python-twisted-core" do
  action :install
  options "--disablerepo=epel"
  version "8.2.0-1.el5.rf"
end

it throws exception with the message that package of that version is not found.

Thank you,
Max


  • [chef] package resource does not consider option "--disablerepo=somerepo", Max Gorbul, 10/05/2012

Archive powered by MHonArc 2.6.16.

§