]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
scripts: sphinx-pre-install: add a warning for Debian-based distros
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 12 Aug 2025 15:52:55 +0000 (17:52 +0200)
committerJonathan Corbet <corbet@lwn.net>
Wed, 13 Aug 2025 16:19:18 +0000 (10:19 -0600)
On Some Debian-based distros, ImageMagick package has a broken
policy that causes LaTeX to fail while building docs.

Add a note about that.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/628d01784e8c24e3d93c69c436f12398e00165b3.1754992972.git.mchehab+huawei@kernel.org
scripts/sphinx-pre-install

index 324baa98a39507cd355d6f16c5b73ff26a7fcde1..09a337509b23f205191ec0859a4906e1d4b30b5c 100755 (executable)
@@ -782,6 +782,11 @@ class SphinxDependencyChecker(MissingCheckers):
 
             self.check_program("dvipng", DepManager.PDF_MANDATORY)
 
+        if not self.distro_msg:
+            self.distro_msg = \
+                "Note: ImageMagick is broken on some distros, affecting PDF output. For more details:\n" \
+                "\thttps://askubuntu.com/questions/1158894/imagemagick-still-broken-using-with-usr-bin-convert"
+
         return self.get_install_progs(progs, "apt-get install")
 
     def give_redhat_hints(self):
@@ -1193,7 +1198,7 @@ class SphinxDependencyChecker(MissingCheckers):
         self.distro_msg = \
             f"I don't know distro {self.system_release}.\n" \
             "So, I can't provide you a hint with the install procedure.\n" \
-            "There are likely missing dependencies.\n"
+            "There are likely missing dependencies."
 
         return self.get_install_progs(progs, None)