Fix openstack_pip provider to support old pip
Do not split string by hyphen and change regex to match both formats - new (with hyphen), and old one like 'pep8 (Current: 1.5.7 Latest: 1.7.0)' Change-Id: I1eeda1b35ff35dfe8b8b0c6e948616a55f33df25
This commit is contained in:
parent
89ea98ffb7
commit
adf639e859
@ -20,7 +20,7 @@ Puppet::Type.type(:package).provide(:openstack_pip, :parent => :pip) do
|
||||
if outdated =~ /#{@resource[:name]}/
|
||||
latest = outdated.split("\n").select { |line|
|
||||
line =~ /#{@resource[:name]}/
|
||||
}.first.split('-')[1].match('Latest: (.*) ')[1]
|
||||
}.first.match('Latest: ([^\s)]*)')[1]
|
||||
else
|
||||
package_info = lazy_pip(['show', @resource[:name]])
|
||||
current = package_info.split("\n").select { |line|
|
||||
|
Loading…
x
Reference in New Issue
Block a user