From cbaed36565570bf01bbcef5c4ece54abda3710bc Mon Sep 17 00:00:00 2001 From: Mike Terzo Date: Thu, 18 Aug 2016 06:04:40 -0400 Subject: [PATCH] Search index when staying at the latest version --- manifests/pip.pp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/manifests/pip.pp b/manifests/pip.pp index 30648208..0d2f3e29 100644 --- a/manifests/pip.pp +++ b/manifests/pip.pp @@ -125,6 +125,11 @@ default => "--index-url=${index}", } + $pypi_search_index = $index ? { + false => '', + default => "--index=${index}", + } + $proxy_flag = $proxy ? { false => '', default => "--proxy=${proxy}", @@ -242,7 +247,7 @@ # Latest version. exec { "pip_install_${name}": command => "${pip_env} wheel --help > /dev/null 2>&1 && { ${pip_env} wheel --version > /dev/null 2>&1 || wheel_support_flag='--no-use-wheel'; } ; { ${pip_env} --log ${log}/pip.log install --upgrade \$wheel_support_flag ${pypi_index} ${proxy_flag} ${install_args} ${install_editable} ${source} || ${pip_env} --log ${log}/pip.log install --upgrade ${pypi_index} ${proxy_flag} ${install_args} ${install_editable} ${source} ;}", - unless => "${pip_env} search ${proxy_flag} ${source} | grep -i INSTALLED.*latest", + unless => "${pip_env} search ${pypi_search_index} ${proxy_flag} ${source} | grep -i INSTALLED.*latest", user => $owner, group => $group, cwd => $cwd,