chef / mixlib-install

A library for interacting with Chef Software Inc's software distribution systems.
Apache License 2.0
12 stars 54 forks source link

el7 artifacts are returned when el5 is passed as options #269

Open jasonwbarnett opened 5 years ago

jasonwbarnett commented 5 years ago

Version:

v3.11.5

Environment:

Tested on both Mac OS 10.13.6 + ChefDK 2.5.3 and on RHEL 5 + Chef 12.22.5

Scenario:

Trying to fetch the latest chef 13 version for RHEL 5.

Steps to Reproduce:

$ chef exec irb
irb(main):001:0> require 'mixlib/install'
=> true
irb(main):002:0> Mixlib::Install.new({:product_name=>"chef", :platform_version_compatibility_mode=>true, :platform=>"el", :platform_version=>"5", :architecture=>"x86_64", :channel=>:stable, :product_version=>'13'}).artifact_info.url
=> "https://packages.chef.io/files/stable/chef/13.12.3/el/7/chef-13.12.3-1.el7.x86_64.rpm"
irb(main):003:0> Mixlib::Install::VERSION
=> "3.11.5"

Expected Result:

"http://packages.chef.io/files/stable/chef/13.6.4/el/5/chef-13.6.4-1.el5.x86_64.rpm"

Actual Result:

"https://packages.chef.io/files/stable/chef/13.12.3/el/7/chef-13.12.3-1.el7.x86_64.rpm"
tas50 commented 5 years ago

platform_version_compatibility_mode is why you're getting the EL 7 package, but you should be able to run the w/o platform_version_compatibility_mode and get the last EL 5 package. That does seem broken to me.