[PATCH] docs: sphinx-pre-install: don't barf on beta Sphinx releases

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



sphinx-pre-install is picky when it comes to parsing sphinx versions; it
fails, killing the docs build, when run with sphinx 4.0.0b1.  Tweak the
regex to tolerate a trailing "bN" on the version number.

Signed-off-by: Jonathan Corbet <corbet@xxxxxxx>
---
The good news is that this appears to be the only thing that explodes
with Sphinx 4.0...

 scripts/sphinx-pre-install | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install
index b5f9fd5b2880..fe92020d67e3 100755
--- a/scripts/sphinx-pre-install
+++ b/scripts/sphinx-pre-install
@@ -259,7 +259,7 @@ sub get_sphinx_version($)
 
 	open IN, "$cmd --version 2>&1 |";
 	while (<IN>) {
-		if (m/^\s*sphinx-build\s+([\d\.]+)(\+\/[\da-f]+)?$/) {
+		if (m/^\s*sphinx-build\s+([\d\.]+)((\+\/[\da-f]+)|(b\d+))?$/) {
 			$ver=$1;
 			last;
 		}
-- 
2.30.2




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux