Merge "fix gem install failure for ubuntu" into dev/experimental

This commit is contained in:
Jenkins 2014-12-01 22:08:59 +00:00 committed by Gerrit Code Review
commit f50b6fc7e0
2 changed files with 11 additions and 2 deletions

View File

@ -44,8 +44,17 @@ node['mysql']['client']['packages'].each do |name|
resources("package[#{name}]").run_action(:install)
end
# unknown reason cause chef-client not to honor .gemrc immediately
# even not until timeout is reached, so specify the options explicitly.
if node['local_repo'].nil? or node['local_repo'].empty?
chef_gem 'mysql'
if node['proxy_url']
gem_package 'mysql' do
options("--http-proxy #{node['proxy_url']}")
action :install
end
else
chef_gem 'mysql'
end
else
gem_package 'mysql' do
options("--clear-sources --source #{node['local_repo']}/gem_repo/")

View File

@ -1,6 +1,6 @@
cat << EOF > /etc/apt/apt.conf
#if $getVar('proxy', '') != ''
Acquire::http::Proxy "$proxy"
Acquire::http::Proxy "$proxy";
#end if
EOF