linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Jonathan Corbet <corbet@lwn.net>
Cc: Linux Doc Mailing List <linux-doc@vger.kernel.org>,
	linux-kernel@vger.kernel.org, Akira Yokosawa <akiyks@gmail.com>
Subject: Re: [PATCH v2 00/15] Some improvements and fixes for the doc build system
Date: Sun, 22 Jun 2025 07:48:09 +0200	[thread overview]
Message-ID: <20250622074809.09fca392@foz.lan> (raw)
In-Reply-To: <87frfsdfgc.fsf@trenco.lwn.net>

Em Sat, 21 Jun 2025 14:09:39 -0600
Jonathan Corbet <corbet@lwn.net> escreveu:

> Mauro Carvalho Chehab <mchehab+huawei@kernel.org> writes:
> 
> > Hi Jon,
> >
> > This series contain patches I made while working at the parser-yaml.
> > They aren't directly related to it. Instead, they address some issues
> > at the build system and provide test tools for building docs.  
> 
> So as you saw I'd applied the previous set - but I've undone that.
> Something in the first patch (the conf.py changes) breaks the dependency
> detection so that every build turns into a full build.  Just run
> "make htmldocs" twice in a row to see what happens.  That somehow needs
> to be fixed...

Tricky. When I originally wrote it, on the top of 8.x, there is no need
to add a connect event. For older versions, this is a need.

I ended adding a 'builder-inited', but this is too late. Changing the
event to 'config-inited' address it.

I'll fold the patch below at patch 01/15.

Regards,
Mauro

diff --git a/Documentation/conf.py b/Documentation/conf.py
index 4ba4ee45e599..91ce2b1c33cc 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -41,7 +41,7 @@ dyn_exclude_patterns = ['output']
 # Properly handle include/exclude patterns
 # ----------------------------------------
 
-def update_patterns(app):
+def update_patterns(app, config):
 
     """
     On Sphinx, all directories are relative to what it is passed as
@@ -65,7 +65,7 @@ def update_patterns(app):
             if rel_path.startswith("../"):
                 continue
 
-            app.config.include_patterns.append(rel_path)
+            config.include_patterns.append(rel_path)
 
     # setup exclude_patterns dynamically
     for p in dyn_exclude_patterns:
@@ -75,7 +75,7 @@ def update_patterns(app):
         if rel_path.startswith("../"):
             continue
 
-        app.config.exclude_patterns.append(rel_path)
+        config.exclude_patterns.append(rel_path)
 
 # helper
 # ------
@@ -574,4 +574,4 @@ kerneldoc_srctree = '..'
 loadConfig(globals())
 
 def setup(app):
-	app.connect('builder-inited', update_patterns)
+    app.connect('config-inited', update_patterns)


Thanks,
Mauro

      reply	other threads:[~2025-06-22  5:48 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-21 19:55 [PATCH v2 00/15] Some improvements and fixes for the doc build system Mauro Carvalho Chehab
2025-06-21 19:55 ` [PATCH v2 01/15] docs: conf.py: properly handle include and exclude patterns Mauro Carvalho Chehab
2025-06-21 19:55 ` [PATCH v2 02/15] docs: Makefile: disable check rules on make cleandocs Mauro Carvalho Chehab
2025-06-21 19:55 ` [PATCH v2 03/15] scripts: scripts/test_doc_build.py: add script to test doc build Mauro Carvalho Chehab
2025-06-21 19:55 ` [PATCH v2 04/15] scripts: test_doc_build.py: make capture assynchronous Mauro Carvalho Chehab
2025-06-21 19:55 ` [PATCH v2 05/15] scripts: test_doc_build.py: better control its output Mauro Carvalho Chehab
2025-06-21 19:55 ` [PATCH v2 06/15] scripts: test_doc_build.py: better adjust to python version Mauro Carvalho Chehab
2025-06-21 19:55 ` [PATCH v2 07/15] scripts: test_doc_build.py: improve dependency list Mauro Carvalho Chehab
2025-06-21 19:55 ` [PATCH v2 08/15] scripts: test_doc_build.py: improve cmd.log logic Mauro Carvalho Chehab
2025-06-21 19:55 ` [PATCH v2 09/15] scripts: test_doc_build.py: make the script smarter Mauro Carvalho Chehab
2025-06-21 19:55 ` [PATCH v2 10/15] scripts: sphinx-pre-install: properly handle SPHINXBUILD Mauro Carvalho Chehab
2025-06-21 19:55 ` [PATCH v2 11/15] scripts: sphinx-pre-install: fix release detection for Fedora Mauro Carvalho Chehab
2025-06-21 19:55 ` [PATCH v2 12/15] scripts: test_doc_build.py: regroup and rename arguments Mauro Carvalho Chehab
2025-06-21 19:55 ` [PATCH v2 13/15] docs: sphinx: add a file with the requirements for lowest version Mauro Carvalho Chehab
2025-06-21 19:55 ` [PATCH v2 14/15] docs: conf.py: several coding style fixes Mauro Carvalho Chehab
2025-06-21 19:55 ` [PATCH v2 15/15] docs: conf.py: Check Sphinx and docutils version Mauro Carvalho Chehab
2025-06-21 20:09 ` [PATCH v2 00/15] Some improvements and fixes for the doc build system Jonathan Corbet
2025-06-22  5:48   ` Mauro Carvalho Chehab [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250622074809.09fca392@foz.lan \
    --to=mchehab+huawei@kernel.org \
    --cc=akiyks@gmail.com \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).