- From: Jacobo García <
>
- To:
- Subject: [chef] Forcing a downgrade/upgrade of an apt package
- Date: Tue, 22 Feb 2011 16:07:06 +0100
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=TkibZgt+XMe2fdoHvCJVkgJtvjQWH1H5wrSVuGFVeR2bqtPRfi5iTIdVZV0n7x2VrO cuf+YhYpMONSmmJcyxoeWdpY3ZOvNKczZA09yNs8wroP3cSobmBpfDmY+Yw+7q+yTv68 /dRxg5aJc0Qlm1hv2TI8hnD0oxV1nvDsBxozA=
Aló chefs,
I am writing a recipe for installing and going back from ruby enterprise edition to regular ruby in ubuntu. The guys at brightbox provide a nice apt repo for ree. In that repo ree is packaged to overwrite regular ruby locations.
The recipe that installs ruby enterprise from regular ruby basically adds a file to /etc/apt/sources.list.d/ruby-ee with the repository parameters, this notifies imediately an apt-get update, and then I have the following code that tries to install ruby.
packages = %w(ruby ruby-dev rubygems libopenssl-ruby libreadline-ruby librmagick-ruby librmagick-ruby1.8 rubygems1.8 ruby1.8 ruby1.8-dev libopenssl-ruby1.8 librmagick-ruby1.8 libruby1.8)
packages.each do |p|
package p do
action [ :install, :upgrade ]
end
end
The reverse operation is performed in a similar way, I just check if ree is installed, then I remove the /etc/apt/sources.list.d/ruby-ee file, apt-get update, and the code above.
My problem: chef does not notice the change (apt-cache show ruby gives the candidate though.)
Is this a problem on how chef handles the apt resource?
Should I pass an extra parameter to the package resource to force the "upgrade"?
Thanks.
- [chef] Forcing a downgrade/upgrade of an apt package, Jacobo García, 02/22/2011
Archive powered by MHonArc 2.6.16.