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 Kristian (klausenbusk) - Saturday, 03 June 2023, 18:07 GMT
Task Type Feature Request
Category Arch Projects
Status Closed
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 100%
Votes 0
Private No

Details

Description:
Currently, all build failures are handled with a die command: https://git.archlinux.org/devtools.git/tree/makechrootpkg.in#n421 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.

Thanks.
This task depends upon

Closed by  Kristian (klausenbusk)
Saturday, 03 June 2023, 18:07 GMT
Reason for closing:  Upstream
Additional comments about closing:  Please report upstream if this is still relevant: https://gitlab.archlinux.org/archlinux/d evtools.
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 https://bugs.archlinux.org/task/63092

Loading...