Folks,
So, I’m a little confused on how yum picks the exact version of a package to install. We have an RPM that we created with fpm, called foo-1.45.noarch.rpm. We have a recipe that installs this package:
yum_package “foo >= 1.45” do
Chef::Log.debug(“Installing package foo w/ yum”)
action :install
end
Yet, when we go through the chef-client run, we get errors like this:
[Mon, 07 Nov 2011 19:31:47 +0000] FATAL: Chef::Exceptions::Exec: yum_package[foo >= 1.45] (web::default line 34) had an error: yum -d0 -e0 -y install foo-1.45-1 returned 1, expected 0
---- Begin output of yum -d0 -e0 -y install foo-1.45-1 ----
STDOUT: STDERR:
Error Downloading Packages:
foo-1.45-1.noarch: failure: foo-1.45.noarch.rpm from repo: [Errno 256] No more mirrors to try.
---- End output of yum -d0 -e0 -y install foo-1.45-1 ----
Where is it getting this “-1” part of the version number? How do we stop that?
Yes, I’m sure I could change all our tooling from jenkins or make or whatever to provide a “–iteration 1” argument to fpm when creating the rpm in the first place, but it would be a lot easier if yum wasn’t trying to look for the wrong version number in the first place.
Thanks!
–
Brad Knowles bknowles@ihiji.com
SAGE Level IV, Chef Level 0.0.1
On Mon, Nov 7, 2011 at 12:13 PM, Brad Knowles bknowles@ihiji.com wrote:
Folks,
So, I'm a little confused on how yum picks the exact version of a package to install. We have an RPM that we created with fpm, called foo-1.45.noarch.rpm. We have a recipe that installs this package:
yum_package "foo >= 1.45" do
Chef::Log.debug("Installing package foo w/ yum")
action :install
end
Yet, when we go through the chef-client run, we get errors like this:
[Mon, 07 Nov 2011 19:31:47 +0000] FATAL: Chef::Exceptions::Exec: yum_package[foo >= 1.45] (web::default line 34) had an error: yum -d0 -e0 -y install foo-1.45-1 returned 1, expected 0
---- Begin output of yum -d0 -e0 -y install foo-1.45-1 ----
STDOUT: STDERR:
Error Downloading Packages:
foo-1.45-1.noarch: failure: foo-1.45.noarch.rpm from repo: [Errno 256] No more mirrors to try.
---- End output of yum -d0 -e0 -y install foo-1.45-1 ----
Where is it getting this "-1" part of the version number? How do we stop that?
For the list archives it appears fpm was omitting the release (-1)
from the filename itself, but the data within the rpm headers was
correct. The issue in question was likely due to renaming the rpm
without updating the repository metadata - not any issue in the
provider that I can see.
Matthew Kent | http://magoazul.com