]> code.ossystems Code Review - openembedded-core.git/commitdiff
terminal: Cope with unreleased versions of tmux
authorMike Crowe <mac@mcrowe.com>
Thu, 22 Nov 2018 10:14:08 +0000 (10:14 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 22 Nov 2018 12:19:26 +0000 (12:19 +0000)
When tmux is built from a non-release Git version, its version number is
"next-X" where X appears to be the expected version number for the next
release. For example, when built from the current state of master, running
"tmux -V" yields:

 tmux next-2.9

Currently check_tmux_pane_size only checks for the version being less than
1.9, so it seems unfair to fail with an obscure Python error in this case.

Let's just use the version number after the "next-" prefix if it is
present.

Signed-off-by: Mike Crowe <mac@mcrowe.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oe/terminal.py

index caeb5e31ec9b7290a1f23952a6cb312c06e1b0a7..afbda595db952e2e4c6ae1fd42d83d85a9ae9821 100644 (file)
@@ -296,6 +296,8 @@ def check_terminal_version(terminalName):
             vernum = ver.split(' ')[-1]
         if ver.startswith('tmux'):
             vernum = ver.split()[-1]
+        if ver.startswith('tmux next-'):
+            vernum = ver.split()[-1][5:]
     return vernum
 
 def distro_name():