[PATCH v2 01/32] docs: temporarily disable the kernel-doc extension

Paolo Bonzini posted 32 patches 5 years, 2 months ago
Maintainers: Peter Maydell <peter.maydell@linaro.org>
[PATCH v2 01/32] docs: temporarily disable the kernel-doc extension
Posted by Paolo Bonzini 5 years, 2 months ago
Preserve bisectability while we update scripts/kernel-doc from Linux.
Without this patch, building with Sphinx 3 would break while we
revert our own Sphinx 3 support and replace it with Linux's.

Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 docs/sphinx/kerneldoc.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/docs/sphinx/kerneldoc.py b/docs/sphinx/kerneldoc.py
index 3ac277d162..9124fcbff1 100644
--- a/docs/sphinx/kerneldoc.py
+++ b/docs/sphinx/kerneldoc.py
@@ -75,6 +75,9 @@ class KernelDocDirective(Directive):
         # Tell sphinx of the dependency
         env.note_dependency(os.path.abspath(filename))
 
+        # Disabled temporarily while scripts/kernel-doc is updated
+        return []
+
         tab_width = self.options.get('tab-width', self.state.document.settings.tab_width)
 
         # FIXME: make this nicer and more robust against errors
-- 
2.26.2



Re: [PATCH v2 01/32] docs: temporarily disable the kernel-doc extension
Posted by Peter Maydell 5 years, 2 months ago
On Tue, 1 Dec 2020 at 10:35, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> Preserve bisectability while we update scripts/kernel-doc from Linux.
> Without this patch, building with Sphinx 3 would break while we
> revert our own Sphinx 3 support and replace it with Linux's.
>
> Suggested-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  docs/sphinx/kerneldoc.py | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/docs/sphinx/kerneldoc.py b/docs/sphinx/kerneldoc.py
> index 3ac277d162..9124fcbff1 100644
> --- a/docs/sphinx/kerneldoc.py
> +++ b/docs/sphinx/kerneldoc.py
> @@ -75,6 +75,9 @@ class KernelDocDirective(Directive):
>          # Tell sphinx of the dependency
>          env.note_dependency(os.path.abspath(filename))
>
> +        # Disabled temporarily while scripts/kernel-doc is updated
> +        return []
> +
>          tab_width = self.options.get('tab-width', self.state.document.settings.tab_width)
>
>          # FIXME: make this nicer and more robust against errors

Oh, this is nicer than having to comment out every use of the extension :-)

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM