Re: [PATCH 1/8] docs: kernel_feat.py: fix build error for missing files

From
Vegard Nossum <hidden>
Date
2024-02-07 15:02:38
Also in
stable
Reply to
Jonathan Corbet, 2024-02-07
On 07/02/2024 15:42, Jonathan Corbet wrote:
Vegard Nossum [off-list ref] writes:
quoted
On 06/02/2024 23:53, Jonathan Corbet wrote:
quoted
Vegard Nossum [off-list ref] writes:
quoted
@@ -109,7 +109,7 @@ class KernelFeat(Directive):
               else:
                   out_lines += line + "\n"
   
-        nodeList = self.nestedParse(out_lines, fname)
+        nodeList = self.nestedParse(out_lines, self.arguments[0])
           return nodeList
So I can certainly track this through to 6.8, but I feel like I'm
missing something:

   - If we have never seen a ".. FILE" line, then (as the changelog notes)
     no files were found to extract feature information from.  In that
     case, why make the self.nestedParse() call at all?  Why not just
     return rather than making a useless call with a random name?

What am I overlooking?
Even if we skip the call in the error/empty case, we still need to pass
a sensible value here in the other cases -- this value is the file that
will be attributed by Sphinx if there is e.g. a reST syntax error in any
of the feature files. 'fname' here is basically the last file that
happened to be read by get_feat.pl, which is more misleading than
self.arguments[0] IMHO.
The purpose is to point the finger at the file that actually contained
the error; are you saying that this isn't working?
For kernel_feat.py: correct, it never did that.

See my longer explanation here:

<https://lore.kernel.org/all/d46018a3-3259-4565-9a25-f9b695519f81@oracle.com/ (local)>


Vegard
Thread (32 messages) 32 messages, 6 authors, last reply 2024-02-08
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help