Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

docs: kfigure.py: Don't warn of missing PDF converter in 'make htmldocs'

SVG -> PDF conversion is not required in "make htmldocs".
It is pointless to always warn of a missing converter.
Demote the log message in setupTools() to verbose.

For "make pdfdocs" (or "make latexdocs"), promote the dynamic
message of "include SVG raw" to a warn.
Expand the message and recommend installing Inkscape or
ImageMagick.

Fixes: 8ccd05697a9d ("docs: sphinx/kfigure.py: Use inkscape(1) for SVG -> PDF conversion")
Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-doc@vger.kernel.org
Acked-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Link: https://lore.kernel.org/r/c80e1481-10d4-7151-fe59-e846259eb0d4@gmail.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>

authored by

Akira Yokosawa and committed by
Jonathan Corbet
d987d5ae 8d6451b9

+5 -3
+5 -3
Documentation/sphinx/kfigure.py
··· 212 212 if convert_cmd: 213 213 kernellog.verbose(app, "use convert(1) from: " + convert_cmd) 214 214 else: 215 - kernellog.warn(app, 215 + kernellog.verbose(app, 216 216 "Neither inkscape(1) nor convert(1) found.\n" 217 217 "For SVG to PDF conversion, " 218 218 "install either Inkscape (https://inkscape.org/) (preferred) or\n" ··· 296 296 297 297 if translator.builder.format == 'latex': 298 298 if not inkscape_cmd and convert_cmd is None: 299 - kernellog.verbose(app, 300 - "no SVG to PDF conversion available / include SVG raw.") 299 + kernellog.warn(app, 300 + "no SVG to PDF conversion available / include SVG raw." 301 + "\nIncluding large raw SVGs can cause xelatex error." 302 + "\nInstall Inkscape (preferred) or ImageMagick.") 301 303 img_node.replace_self(file2literal(src_fname)) 302 304 else: 303 305 dst_fname = path.join(translator.builder.outdir, fname + '.pdf')