Skip to contentSkip to conversation

docs: make sphinx-build be quiet by default

PATCH Superseded Daniel P. Berrangé 2 participants 3 messages Aug 10, 2021 – Aug 11, 2021 Arm/Amlogic Meson SoC support

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 docs: make sphinx-build be quiet by default

The sphinx-build is fairly verbose spitting out pages of output to the console, which causes errors from other build commands to be scrolled off the top of the terminal. This can leave the mistaken impression that the build passed, when in fact there was a failure.

---

In v2:

- This time with the extra trailing ',' actually committed

 docs/meson.build | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
docs/meson.build +4 -3
index 300b134329..42d7555bc4 100644
@@ -21,7 +21,7 @@ if sphinx_build.found()
   run_command('mkdir', ['-p', tmpdir / 'sphinx'])
   run_command('touch', [tmpdir / 'sphinx/index.rst'])
   sphinx_build_test_out = run_command(SPHINX_ARGS + [
-    '-c', meson.current_source_dir(),
+    '-q', '-c', meson.current_source_dir(),
     '-b', 'html', tmpdir / 'sphinx',
     tmpdir / 'sphinx/out'])
   build_docs = (sphinx_build_test_out.returncode() == 0)
@@ -98,8 +98,9 @@ if build_docs
                               input: this_manual,
                               install: build_docs,
                               install_dir: install_dirs,
-                              command: [SPHINX_ARGS, '-b', 'man', '-d', private_dir,
-                                        input_dir, meson.current_build_dir()])
+                              command: [SPHINX_ARGS, '-q', '-b', 'man',
+                                        '-d', private_dir, input_dir,
+                                        meson.current_build_dir()])
 
   alias_target('sphinxdocs', sphinxdocs)
   alias_target('html', sphinxdocs)
Signature · 1 line
2.31.1
#1 lore raw

Hi

Quoted 7 lines · Daniel P. Berrangé

The sphinx-build is fairly verbose spitting out pages of output to the console, which causes errors from other build commands to be scrolled off the top of the terminal. This can leave the mistaken impression that the build passed, when in fact there was a failure.

Without this patch, I miss the warnings 99% of the time!!

You are missing one -q though:

docs/meson.build +0 -0
index 42d7555bc4..51fa902cd9 100644
@@ -78,7 +78,7 @@ if build_docs
                 input: files('conf.py'),
                 depfile: 'docs.d',
                 depend_files: [ sphinx_extn_depends, sphinx_template_files

],
- command: [SPHINX_ARGS, '-Ddepfile=@DEPFILE@',
+ command: [SPHINX_ARGS, '-q', '-Ddepfile=@DEPFILE@',

                           '-Ddepfile_stamp=@OUTPUT0@',
                           '-b', 'html', '-d', private_dir,
                           input_dir, output_dir])

Why not update SPHINX_ARGS instead?

---

Quoted 40 lines

In v2:

- This time with the extra trailing ',' actually committed

 docs/meson.build | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
docs/meson.build +4 -3
index 300b134329..42d7555bc4 100644
@@ -21,7 +21,7 @@ if sphinx_build.found()
   run_command('mkdir', ['-p', tmpdir / 'sphinx'])
   run_command('touch', [tmpdir / 'sphinx/index.rst'])
   sphinx_build_test_out = run_command(SPHINX_ARGS + [
-    '-c', meson.current_source_dir(),
+    '-q', '-c', meson.current_source_dir(),
     '-b', 'html', tmpdir / 'sphinx',
     tmpdir / 'sphinx/out'])
   build_docs = (sphinx_build_test_out.returncode() == 0)
@@ -98,8 +98,9 @@ if build_docs
                               input: this_manual,
                               install: build_docs,
                               install_dir: install_dirs,
-                              command: [SPHINX_ARGS, '-b', 'man', '-d',
 private_dir,
-                                        input_dir,
 meson.current_build_dir()])
+                              command: [SPHINX_ARGS, '-q', '-b', 'man',
+                                        '-d', private_dir, input_dir,
+                                        meson.current_build_dir()])
 

alias_target('sphinxdocs', sphinxdocs)
alias_target('html', sphinxdocs)
--
2.31.1

Signature · 1 line
Marc-André Lureau
#2 lore raw
Quoted 32 lines · Marc-André Lureau

Hi

Quoted 7 lines · Daniel P. Berrangé

The sphinx-build is fairly verbose spitting out pages of output to the console, which causes errors from other build commands to be scrolled off the top of the terminal. This can leave the mistaken impression that the build passed, when in fact there was a failure.

Without this patch, I miss the warnings 99% of the time!!

You are missing one -q though:

docs/meson.build +1 -1
index 42d7555bc4..51fa902cd9 100644
@@ -78,7 +78,7 @@ if build_docs
                 input: files('conf.py'),
                 depfile: 'docs.d',
                 depend_files: [ sphinx_extn_depends, sphinx_template_files
 ],
-                command: [SPHINX_ARGS, '-Ddepfile=@DEPFILE@',
+                command: [SPHINX_ARGS, '-q', '-Ddepfile=@DEPFILE@',
                           '-Ddepfile_stamp=@OUTPUT0@',
                           '-b', 'html', '-d', private_dir,

input_dir, output_dir])

Quoted 1 line

Why not update SPHINX_ARGS instead?

🤦 that would be a better idea.

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|