Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#63091 - [devtools] Return the actual build failure return code

Attached to Project: Arch Linux
Opened by Siddhartha Sahu (sdh) - Wednesday, 03 July 2019, 23:13 GMT
Last edited by freswa (frederik) - Saturday, 22 February 2020, 21:45 GMT
Task Type Feature Request
Category Packages: Extra
Status Assigned
Assigned To Pierre Schmitz (Pierre)
Levente Polyak (anthraxx)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No


Currently, all build failures are handled with a die command: and returns code 255.
However, I want to be able to distinguish between the different build failures. E.g., "A package has already been built." (13) vs actual failures such as "pkgver is not allowed to be empty" (12). It would help if makechrootpkg returns the actual build failure code from line 408 in the file linked above.

Additional info:
* package version: 20190329-1

Steps to reproduce:
* Try to build a PKGBUILD with the package file already present in the folder.
* Build fails with message "A package has already been built...".
* Return code is 255, but expected return code to be 13.

This task depends upon

Comment by Dave Reisner (falconindy) - Wednesday, 03 July 2019, 23:20 GMT
What happens when the "build" fails before invoking makepkg?
Comment by Siddhartha Sahu (sdh) - Wednesday, 03 July 2019, 23:25 GMT
I don't think I care about those failures. The only use case I have till now is when the build fails with "A package has already been built. (use -f to overwrite)", because I want to treat that as success and thus want to be able to test for that.

Note that this build failure is dependent on a local change I did, as reported at