View Issue Details

IDProjectCategoryView StatusLast Update
0037304mantisbttoolspublic2026-07-13 18:42
Reporterdregad Assigned Todregad  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Target Version2.29.0Fixed in Version2.29.0 
Summary0037304: Build scripts: abort execution when an external command fails
Description

The main build script (buildrelease-repo.py) is relies on helper scripts (buildrelease.py and docbook-manual.py).

If an external command fails within one of these child scripts, the error is shown on screen but the exit code is not captured by the caller, which continues its execution as though everything ran successfully.

(...)
Running /Users/dregad/bin/publican clean
/Users/dregad/dev/mantisbt/mantis/docbook/Admin_Guide
ERROR: Command '['/Users/dregad/bin/publican', 'clean']' returned non-zero exit status 1.
Creating release tarballs...
(...)

Execution should have stopped after ERROR.

Steps To Reproduce
  1. Make publican unavailable (e.g. rename, chmod, stop docker, etc)
  2. Run build/buildrelease-repo.py --fresh --docbook --ref release-2.28.4 --clean /tmp/release
Additional Information

This caused the release zip / tarball for 2.28.4 to be published on sourceforge without the documentation.

Reported by @atrol on Gitter.

TagsNo tags attached.

Activities

There are no notes attached to this issue.

Related Changesets

MantisBT: master d2add93a

2026-07-12 11:06

dregad


Details Diff
Call subprocess.run to build manuals

With check=True, an exception is thrown if the command fails, allowing
error handling.

This required adapting the command from string to list so it can be
called without initializing a shell.

Fixes 0037304
Affected Issues
0037304
mod - build/buildrelease-repo.py Diff File
mod - build/buildrelease.py Diff File

MantisBT: master 25b71dbd

2026-07-12 11:43

dregad


Details Diff
Publican does not output anything to stderr

Print stdout in the exception block.

Also, using subprocess.run in Text mode avoids the need to call decode
on the output.

Issue 0037304
Affected Issues
0037304
mod - build/docbook-manual.py Diff File