Description
Actions plugin allows to execute external program for given libdnf5 hooks, but there seems to be no way to propagate an error back when the external program exits with non zero return code.
It would be interesting to have an option (in actions file format) to make dnf5 to raise an error when command returns non zero return code. Right now, the error is ignored.
Reasoning
I was exploring the actions plugin to see if I could implement etckeeper dnf5 integration this way, and it turns out that this error handing functionality is the only missing piece.
See https://bugzilla.redhat.com/show_bug.cgi?id=2326283#c3
Example
It could workd like this: by specifying raise_error=1 dnf5 would stop the transaction.
# cat /etc/dnf/libdnf5-plugins/actions.d/etckeeper.actions
pre_transaction:::raise_error=1:etckeeper pre-install
post_transaction:::raise_error=1:etckeeper post-install
Description
Actions plugin allows to execute external program for given libdnf5 hooks, but there seems to be no way to propagate an error back when the external program exits with non zero return code.
It would be interesting to have an option (in actions file format) to make dnf5 to raise an error when command returns non zero return code. Right now, the error is ignored.
Reasoning
I was exploring the actions plugin to see if I could implement etckeeper dnf5 integration this way, and it turns out that this error handing functionality is the only missing piece.
See https://bugzilla.redhat.com/show_bug.cgi?id=2326283#c3
Example
It could workd like this: by specifying
raise_error=1dnf5 would stop the transaction.