Bug 4413 - urpmi handling of post scriplets could be better
Summary: urpmi handling of post scriplets could be better
Status: RESOLVED INVALID
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: i586 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Thierry Vignaud
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-04 21:43 CET by David Walser
Modified: 2012-02-07 11:25 CET (History)
0 users

See Also:
Source RPM: urpmi
CVE:
Status comment:


Attachments

Description David Walser 2012-02-04 21:43:52 CET
First some background on what made me think of this.  On the apache 2.2.22 update that just happened on Mandriva 2010.2, there was a new symbol in httpd that one of the apache modules depended on.  urpmi updated the apache-modules before the apache-mpm (which contains httpd), and when the post scriplet tried to restart httpd, it failed because of the missing symbol.  Then when the apache-mpm was installed, the post scriplet didn't try to restart httpd, because it was no longer running.

This got me thinking that there are a couple of possible ways urpmi could handle post scriplets better that would have mitigated this problem.

One is that if urpmi is upgrading a bunch of packages that run the same post scriplet, to wait until they are all installed and just run it once.  A possible problem I could foresee with this is if not all of the packages get installed in the same transaction (when urpmi splits it up), it's possible all of the packages aren't downloaded yet such that urpmi can check their post scriplets.

The other idea is that with post scriplets that check to see if a service is running and restart it if it is, to remember interally in urpmi the result of the first time the test for the running service is run, and then use that result instead of re-running the same test for other post scriplets.  How would this have helped?  If it remembered when it tested on apache-modules that httpd service was running, even though restarting it at that point failed, when apache-mpm ran the same scriplet, it would know that httpd service had previously been running, so it would try to restart it even though it was no longer running.
Manuel Hiebel 2012-02-05 11:20:03 CET

Assignee: bugsquad => thierry.vignaud

Comment 1 Thierry Vignaud 2012-02-07 11:25:20 CET
That's bogus. Those are packaging issues, not package manager issues.

The real issue is that those modules should have versioned requires on httpd (which they seems to have on mga).

As for the second point, the proper fix would be to switch either to post-trans[1] or to filetriggers so that apache is restarted only once per transaction.
See /var/lib/rpm/filetriggers/

[1] hoping they got optimized by rpm, which I doubt here

Status: NEW => RESOLVED
Resolution: (none) => INVALID


Note You need to log in before you can comment on or make changes to this bug.