[Rpm-maint] [rpm-software-management/rpm] File triggers running twice on upgrade due to source/target (Issue #4045)
Panu Matilainen
notifications at github.com
Fri Nov 14 11:22:21 UTC 2025
pmatilai created an issue (rpm-software-management/rpm#4045)
Note: This assumes #4044 has been merged.
When both the triggering and triggered package are updated in the same transaction, %filetriggerin and %filetriggerun run twice and one of the calls has wrong argument count. This is demonstrated in the "basic file triggers: runtime args" test where both parallel and parallel-trigger are updated, the exact outcome depending on the argument order:
> parallel-trigger-1.0-1 TRANSFILETRIGGERUN 1 | 12
parallel-trigger-2.0-1 FILETRIGGERIN 2 1 | 12
parallel-trigger-2.0-1 FILETRIGGERIN 2 2 | 12
parallel-trigger-1.0-1 FILETRIGGERUN 1 2 | 24
parallel-trigger-2.0-1 FILETRIGGERPOSTUN 1 1 | 11
parallel-trigger-2.0-1 TRANSFILETRIGGERPOSTUN 1 | 0
parallel-trigger-2.0-1 TRANSFILETRIGGERIN 2 | 12
In the above, FILETRIGGERIN should only be run once, with 2 2 arguments.
> parallel-trigger-2.0-1 TRANSFILETRIGGERUN 1 | 12
parallel-trigger-3.0-1 FILETRIGGERIN 2 2 | 24
parallel-trigger-2.0-1 FILETRIGGERUN 2 1 | 11
parallel-trigger-3.0-1 FILETRIGGERPOSTUN 2 1 | 11
parallel-trigger-2.0-1 FILETRIGGERUN 1 1 | 12
parallel-trigger-3.0-1 TRANSFILETRIGGERPOSTUN 1 | 0
parallel-trigger-3.0-1 TRANSFILETRIGGERIN 2 | 12
Here, FILETRIGGERUN gets called twice, the other being *after* FILETRIGGERPOSTUN, where it makes no sense and has no chance of doing what a filetriggerun script is expected to do. The right thing would be only be run once, with 1 1 arguments.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/4045
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/issues/4045 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20251114/27528a0b/attachment.htm>
More information about the Rpm-maint
mailing list