Skip to content

Commit

Permalink
WIP Tentative fix to htmldocs build error with Sphinx 7.2.x
Browse files Browse the repository at this point in the history
Forward port of change suggested by @severach in Sphinx github
issue #11629 [1].

Link: [1] sphinx-doc/sphinx#11629
  • Loading branch information
akiyks committed Aug 23, 2023
1 parent 21b25bd commit 0098b20
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Documentation/sphinx/kerneldoc.py
Expand Up @@ -138,7 +138,7 @@ def run(self):
lineoffset = int(match.group(1)) - 1
# we must eat our comments since the upset the markup
else:
doc = env.srcdir + "/" + env.docname + ":" + str(self.lineno)
doc = scr(env.srcdir) + "/" + str(env.docname) + ":" + str(self.lineno)
result.append(line, doc + ": " + filename, lineoffset)
lineoffset += 1

Expand Down
2 changes: 1 addition & 1 deletion Documentation/sphinx/kfigure.py
Expand Up @@ -309,7 +309,7 @@ def convert_image(img_node, translator, src_fname=None):
if dst_fname:
# the builder needs not to copy one more time, so pop it if exists.
translator.builder.images.pop(img_node['uri'], None)
_name = dst_fname[len(translator.builder.outdir) + 1:]
_name = dst_fname[len(str(translator.builder.outdir)) + 1:]

if isNewer(dst_fname, src_fname):
kernellog.verbose(app,
Expand Down

3 comments on commit 0098b20

@severach
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't line 141 be "str" instead of "scr"?

@akiyks
Copy link
Owner Author

@akiyks akiyks commented on 0098b20 Aug 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, my typo ...
Fixed as a tentative commit 5c455b6.

Anyway, I'm not going to submit this to LKML.

If this change is unavoidable in upstream kernel documentation, I think it should be you who will submit it as a proper patch.
What do you think?

@severach
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kernel submission by email is too obtuse for me. They'll find it here or on my AUR packages.

Please sign in to comment.