Bug 56521
Summary: | RFE: run-once pre/post scripts. | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Aleksey Nogin <aleksey> |
Component: | rpm | Assignee: | Paul Nasrat <nobody+pnasrat> |
Status: | CLOSED UPSTREAM | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | rawhide | CC: | herrold, mitr |
Target Milestone: | --- | Keywords: | FutureFeature |
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Enhancement | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2005-06-07 19:59:25 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Aleksey Nogin
2001-11-20 15:50:04 UTC
Yup, well understood. In fact, running /sbin/ldconfig in %post and %postun for each and every package that has a shared library during an upgrade is more than a bit dumb. I'm willing to wager that running ldconfig is at least 15% of the wall clock time of an upgrade. Any takers? However, since this can't be changed in rpm alone, each and every package in the distro is gonna need to change, I'm going to mark this as deferred, as I can't solve the problem in rpm alone. Yeah, ldconfig is probably the biggest one of all. Especially on upgrade where all kinds of post and postun scripts call it. I would imagine that solving this has chances to reduce the upgrade time quite dramatically. Would the following approach make sense: - rpm would provide a script /sbin/rpm-run-once such that whenever a package calls /sbin/rpm-run-once prog args it would remember it and than run prog args at some later point. Of cource, that "some later point" is tricky - if a package runs something right away (w/o using the rpm-run-once) in a pre script, we need to make sure all the post scripts for its pre-dependencies have been already executed. I guess this means that the post scripts should be ran in batches (delayed until the first pre script that cares about those). In each batch the first invocation of "/sbin/rpm-run-once prog args" would just run the "prog args" right away and then the subsequent calls (with the same prog and args) withing the same batch would just be ignored. A cute thing is that we can just start with a dummy implementation - rpm-run-once would just exec prog args right away. Does not give any advantage except give people the chance to start converting to new /sbin/rpm-run-once. Can also be used for legacy rpm versions, once the real thing is there in the new versions. A specific ldconfig optimisation is available in rpm. |