Hi Martin, Martin Wilck <mwilck@suse.com> writes:
Can anyone tell what exactly happens if an rpm transaction contains both calls to %posttrans and %transfiletriggerin? Is there any reliable order in which these scripts are called in the posttrans stage?
librpm will first run %posttrans and then %transfiletriggerin (see [1] and [2]). However, I cannot tell you exactly how zypper does it, because it subprocesses calls to rpm without calling the scriptlets and calls them manually afterwards. So I wouldn't rely on any ordering of these scriptlets, as you might get different behaviors between zypper and dnf.
Or putting it differently, is there any way to make sure the %posttrans script of package A runs after the %transfiletriggerin of package B, or vice versa?
At least with librpm: it does not look like there's a way. Cheers, Dan Footnotes: [1] https://github.com/rpm-software-management/rpm/blob/master/lib/transaction.c... [2] https://github.com/rpm-software-management/rpm/blob/master/lib/transaction.c... -- Dan Čermák <dcermak@suse.com> Software Engineer Development tools SUSE Software Solutions Germany GmbH Maxfeldstr. 5 90409 Nuremberg Germany (HRB 36809, AG Nürnberg) Managing Director: Felix Imendörffer