Pacman

Historical bug tracker for the Pacman package manager.

The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues

This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
Tasklist

FS#57482 - [pacman] better handling of transaction hook failures

Attached to Project: Pacman
Opened by Norbert Pfeiler (npfeiler) - Monday, 12 February 2018, 14:56 GMT
Last edited by Allan McRae (Allan) - Monday, 12 February 2018, 21:05 GMT
Task Type Feature Request
Category Backend/Core
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version 5.0.1
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

If a pre-transaction hook fails pacman just continues as if it was successful.

Failed post-transaction hooks are also ignored (which is a pretty big problem if i.e. the initrams couldn’t be regenerated).
They should imho be marked for rerun during the next pacman execution or something like that.

In both cases pacman should indicate at the end that the transaction didn’t complete without problems or abort/reverse it.
This task depends upon

Closed by  Allan McRae (Allan)
Monday, 12 February 2018, 21:05 GMT
Reason for closing:  None
Additional comments about closing:  AbortOnFail + reading.
Comment by Andrew Gregory (andrewgregory) - Monday, 12 February 2018, 15:51 GMT
If you want pacman to abort when a pre-transaction hook fails you need to set AbortOnFail in the hook. Otherwise, it's up to the user to actually read pacman's output and fix any errors.
Comment by Eli Schwartz (eschwartz) - Monday, 12 February 2018, 16:30 GMT
"marked for rerun during the next pacman execution" -- pacman does not have any functionality for remembering the state of previous transactions, and I think it is completely reasonable to expect the user to handle that. I very much doubt that the hook will suddenly succeed on the next pacman execution, because if it failed once it failed for a reason and the user will need to figure out why!

"pacman should indicate at the end that the transaction didn’t complete" -- It does? pacman hooks run at the end, and indicate when they don't complete successfully.

"or abort/reverse it" -- pacman does not atomically update the system, so it cannot atomically roll back an update. That would require filesystem-level handling, and you can essentially get this by using the [community]/snap-pac package, so I don't think this is something pacman's core needs to do...

Loading...