Extend timeout in debian/make-manpages and make it non-fatal
authorStuart Prescott <stuart@debian.org>
Tue, 7 Apr 2026 05:03:45 +0000 (15:03 +1000)
committerStuart Prescott <stuart@debian.org>
Tue, 7 Apr 2026 05:03:45 +0000 (15:03 +1000)
Closes: #1132528
debian/make-manpages

index b0eea78e4b73808c14c73349f22e3c817f51f5d9..92c303434e80705669b1434506efcfc019066c3e 100755 (executable)
@@ -56,11 +56,19 @@ def _run_help2man(tool, toolname, help_opt):
     print(f"I: {''.join(cmd_summary)}")
 
     # Run the tool
-    ret = subprocess.run(cmd, capture_output=True, timeout=10, encoding="UTF-8", env=env)
-    if ret.returncode != 0:
-        print(f"W: returned: {ret.returncode}:\n")
-        print(textwrap.indent(ret.stdout, "W: "))
-        print(textwrap.indent(ret.stderr, "W: "))
+    try:
+        subprocess.run(
+            cmd,
+            capture_output=True,
+            check=True,
+            timeout=180,
+            encoding="UTF-8",
+            env=env,
+        )
+    except (subprocess.CalledProcessError, subprocess.TimeoutExpired) as e:
+        print(f"W: {e}:\n")
+        print(textwrap.indent(e.stdout, "W: "))
+        print(textwrap.indent(e.stderr, "W: "))
 
 
 # PATH CONFIG FOR TOOL