Commit e3d04b46 authored by Nirbheek Chauhan's avatar Nirbheek Chauhan 🐜
Browse files

cerbero: Fix regex parsing of --version output

Perl's version number in the `--version` looks like: `(v5.30.2)`.
However, other tools like cmake look like: `'cmake version 3.17.3'`.

Need to change the regex. This broke in the previous commit
f12e5ed2

Part-of: <gstreamer/cerbero!499>
parent f12e5ed2
......@@ -683,9 +683,9 @@ def check_tool_version(tool_name, needed, env):
out = check_output([tool, '--version'], env=env)
except FatalError:
return None, False, False
m = re.search('v[0-9]+\.[0-9]+(\.[0-9]+)?', out)
m = re.search('([0-9]+\.[0-9]+(\.[0-9]+)?)', out)
if m:
found = m.group()[1:]
found = m.groups()[0]
newer = StrictVersion(found) >= StrictVersion(needed)
return tool, found, newer
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment