FS#54204 - Change makepkg return status when install fails

Attached to Project: Pacman
Opened by Daniel Bermond (Bermond) - Saturday, 27 May 2017, 14:54 GMT
Last edited by Allan McRae (Allan) - Monday, 08 January 2018, 05:06 GMT
Task Type Feature Request
Category makepkg
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version 5.0.1
Due in Version 5.1.0
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


When a package fails to install with 'makepkg -i' the return status is zero ($? variable).
For example, in case of package conflict or dependency breaking.

This does not reflect that the command failed to do what is being requested (build _and_ install).

Since the return status is zero, a script cannot really on checking for 'makepkg -i' return status to test if a package was built _and_ correctly installed.

Changing this a non-zero return status would better reflect what happened and would allow a script to test/address this situation.

Additional info:
* package version(s): makepkg (pacman) 5.0.1

Steps to reproduce:
$ makepkg -i # using any package that causes a package conflict or dependency breaking
$ printf '%s\n' "$?" # result is 0
This task depends upon

Closed by  Allan McRae (Allan)
Monday, 08 January 2018, 05:06 GMT
Reason for closing:  Fixed
Additional comments about closing:  Git commit ab2be5794de8a5
Comment by Eli Schwartz (eschwartz) - Thursday, 07 December 2017, 06:47 GMT
  • Field changed: Due in Version (Undecided → 5.1.0)
https://lists.archlinux.org/pipermail/pacman-dev/2017-September/022156.html is currently queued for pacman 5.1.

(Suggestions for further error codes -- if any -- would be appropriate at this time.)