I am trying to use file triggers to perform actions when a kernel gets installed. Ie copy the kernel into the ESP and create boot entries. It could happen that the ESP runs out of space. In that case the system would not boot. In a traditional system one would be doomed anyway. In a transactional system however the system to boot next gets prepared as snapshot in a chroot. So that snapshot can just be thrown away when it can't be made bootable (in fact if anything goes wrong, such as rpm scriptlets).
Unfortunately AFAICT the return value of file triggers is ignored, see
|
runFileTriggers(ts, NULL, RPMSENSE_TRIGGERIN, RPMSCRIPT_TRANSFILETRIGGER, 0); |
So we never know whether the transaction had any failures in file triggers. In fact according to the code no post transaction scriptlets and neither plugins can make rpmtsRun() fail. Is there a reason for that resp any chance to change that?
I am trying to use file triggers to perform actions when a kernel gets installed. Ie copy the kernel into the ESP and create boot entries. It could happen that the ESP runs out of space. In that case the system would not boot. In a traditional system one would be doomed anyway. In a transactional system however the system to boot next gets prepared as snapshot in a chroot. So that snapshot can just be thrown away when it can't be made bootable (in fact if anything goes wrong, such as rpm scriptlets).
Unfortunately AFAICT the return value of file triggers is ignored, see
rpm/lib/transaction.c
Line 1876 in 33bc736
So we never know whether the transaction had any failures in file triggers. In fact according to the code no post transaction scriptlets and neither plugins can make
rpmtsRun()fail. Is there a reason for that resp any chance to change that?