Merge "Fix openstack_pip provider for pip 18"

This commit is contained in:
Zuul 2019-03-25 14:40:24 +00:00 committed by Gerrit Code Review
commit 0271a919e3
1 changed files with 7 additions and 1 deletions

View File

@ -20,7 +20,13 @@ Puppet::Type.type(:package).provide(:openstack_pip, :parent => :pip) do
if outdated =~ /#{@resource[:name]}/
latest = outdated.split("\n").select { |line|
line =~ /#{@resource[:name]}/
}.first.match('Latest: ([^\s)]*)')[1]
}.first
_latest = latest.match('Latest: ([^\s)]*)')
if _latest
latest = _latest[1]
else
latest = latest.split(' ')[2]
end
else
package_info = lazy_pip(['show', @resource[:name]])
current = package_info.split("\n").select { |line|