[Rpm-maint] [rpm-software-management/rpm] allow file triggers to make transaction fail? (Issue #2581)

Panu Matilainen notifications at github.com
Wed Aug 23 07:54:43 UTC 2023


This is one of those semi-annual issues ever since, somewhat controversially, changed in rpm 4.6.0.

See https://bugzilla.redhat.com/show_bug.cgi?id=216221 and https://bugzilla.redhat.com/show_bug.cgi?id=465409 for some background. In retrospective, just ignoring all non-pre scriptlet errors may well have been a mistake, I was still very green at the time. 

Changing back to the old behavior would not make the related problems go away though, it would just change the ones you encounter. Duplicate headers left behind in the db and needing cleanup are one, but there's also the error code semantics to consider: rpm cannot undo installations, so once the files have been laid down there's no way of going back. So the current rpmtsRun() error code (which bubbles up all the way up to the cli exit code) basically tells you whether the files were successfully laid down, because that's a clear line rpm can draw. An API user can detect all scriptlet failures via the callback, but returning a failure when rpm returns success for the same gets confusing, and so is best avoided.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2581#issuecomment-1689467467
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/issues/2581/1689467467 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20230823/1f7e8df8/attachment.html>


More information about the Rpm-maint mailing list