From 5bfc238389fa7a20ad1ea241be3a96f9964ca7a2 Mon Sep 17 00:00:00 2001 From: "J. Brandt Buckley" Date: Tue, 16 Jun 2015 08:52:32 -0700 Subject: [PATCH] Fix Riak EE download URL following 2.1 release While I'd prefer that #170 be merged, in order to speed things along in case there's concern about the version bump, here's an alternative patch with only the part that fixes the broken Riak EE download URL. For posterity: The difference between the URLs is that the new one omits the `major_minor` part of the path. --- recipes/package.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/recipes/package.rb b/recipes/package.rb index f84967b..9a40d59 100644 --- a/recipes/package.rb +++ b/recipes/package.rb @@ -24,9 +24,15 @@ major_minor = %w(major minor).map { |ver| node['riak']['package']['version'][ver] }.join('.') package_version = "#{version_str}-#{node['riak']['package']['version']['build']}" install_method = node['platform'] == 'freebsd' || oss_or_ee == 'riak-ee' ? 'custom_package' : node['riak']['install_method'] -ee_url_prefix = "http://private.downloads.basho.com/riak_ee/#{node['riak']['package']['enterprise_key']}/#{major_minor}/#{version_str}" plat_ver_int = node['platform_version'].to_i +# Enterprise download URL changed with release of 2.1 +if major_minor.to_f >= 2.1 + ee_url_prefix = "http://private.downloads.basho.com/riak_ee/#{node['riak']['package']['enterprise_key']}/#{major_minor}/#{version_str}" +else + ee_url_prefix = "http://private.downloads.basho.com/riak_ee/#{node['riak']['package']['enterprise_key']}/#{version_str}" +end + case install_method when 'package', 'custom_repository' case node['platform']