linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Allow git builds of Sphinx
@ 2020-01-24 18:33 Stephen Kitt
  2020-02-05 17:40 ` Jonathan Corbet
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Kitt @ 2020-01-24 18:33 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Jonathan Corbet, linux-doc
  Cc: linux-kernel, Stephen Kitt

When using a non-release version of Sphinx, from a local build (with
improvements for kernel doc handling, why not),

	sphinx-build --version

reports versions of the form

	sphinx-build 3.0.0+/4703d9119972

i.e. base version, a plus symbol, slash, and the start of the git hash
of whatever repository the command is run in (no, not the hash that
was used to build Sphinx!).

This patch fixes the installation check in sphinx-pre-install to
recognise such version output.

Signed-off-by: Stephen Kitt <steve@sk2.org>
---
 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 470ccfe678aa..a8f0c002a340 100755
--- a/scripts/sphinx-pre-install
+++ b/scripts/sphinx-pre-install
@@ -272,7 +272,7 @@ sub check_sphinx()
 
 	open IN, "$sphinx --version 2>&1 |" or die "$sphinx returned an error";
 	while (<IN>) {
-		if (m/^\s*sphinx-build\s+([\d\.]+)$/) {
+		if (m/^\s*sphinx-build\s+([\d\.]+)(\+\/[\da-f]+)?$/) {
 			$cur_version=$1;
 			last;
 		}
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Allow git builds of Sphinx
  2020-01-24 18:33 [PATCH] Allow git builds of Sphinx Stephen Kitt
@ 2020-02-05 17:40 ` Jonathan Corbet
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Corbet @ 2020-02-05 17:40 UTC (permalink / raw)
  To: Stephen Kitt; +Cc: Mauro Carvalho Chehab, linux-doc, linux-kernel

On Fri, 24 Jan 2020 19:33:16 +0100
Stephen Kitt <steve@sk2.org> wrote:

> When using a non-release version of Sphinx, from a local build (with
> improvements for kernel doc handling, why not),
> 
> 	sphinx-build --version
> 
> reports versions of the form
> 
> 	sphinx-build 3.0.0+/4703d9119972
> 
> i.e. base version, a plus symbol, slash, and the start of the git hash
> of whatever repository the command is run in (no, not the hash that
> was used to build Sphinx!).
> 
> This patch fixes the installation check in sphinx-pre-install to
> recognise such version output.
> 
> Signed-off-by: Stephen Kitt <steve@sk2.org>
> ---

Seems useful.  Applied, thanks.

jon

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-05 17:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-24 18:33 [PATCH] Allow git builds of Sphinx Stephen Kitt
2020-02-05 17:40 ` Jonathan Corbet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).