|
|
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Jeff Johnson wrote:
Exactly. This is what's causing me trouble; essentially, I have a command that would be better to run at the end of the entire transaction. But I think I understand why rpm doesn't work that way...On Sep 15, 2008, at 11:24 PM, Michael A. Peters wrote:Toralf Lund wrote:I've run into an installation order issue related to the "post" scriptlet in one of my packages. Basically, this scripts executes a (command-line only) program installed by the package, and this program pretty much needs everything required by the package. The problem is, if I install my package along with some of the required software, the requirements are often installed *after* the "main" package [ ... ]Perhaps my understanding is wrong - but I believe:Um, yes, wrong.[ .. ]The %pre and %post scripts are run immediately before/after a package is installed,not after all the packages are installed.
This is also true for %preun/%postun when a package is erased, the scripts are runimmediately before/after the erasure.My understanding of this may not be 100%What is most confusing is that rpm does install before erase. Which means that %post scriptlet is run before %preun is run, which is perhaps counter-intuitive, but is exactly what is needed if shared libraries are being upgraded on live systems. The new librrary must be installed before the old library is removed in ordeer to minimize the windowwhere the library is not available.
Quite.
In my case the script and the package itself both need (more or less) the same libs. Logically, they may be seen as independent sets of dependencies, though, I think...[ ... ]And finally that brings the topic to context markers like Requires(post) etc.Context markers like Requires(post) are intended to break dependency loops whileordering.A package that "needs" some other package solely while running a %post scriptlet, not after being installed, can carry a Requires(post) hint to the ordering within rpm.
Well. It doesn't help me too much with my original issue. But, like I said elsewhere, I can't seem to reproduce the problem I thought I had, so maybe it doesn't matter. I'm still confused, though.The hint excludes dependency loops between install <=> erase packages.The other major affect of adding an explicit Requires(post) hint is that those dependencies are not registered in an rpmdb because they were needed solely for installing, not for using or erasing, a package. There's no need to keep track of the install context dependencies after the install has been done becausethe %post scriptlet is run only during install, never run after install. hth
Question: Can I generally assume the packages are ordered according to "Requires" these days, i.e. that if package A requires something provided by package B, then B is installed before A (when A and B are both part of the same transaction)? I'm fairly sure I couldn't when I started using rpm, so I had to mess about with ""PreReq" instead...
73 de jeff_______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list_______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list
_______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list