Bug 46439
Summary: | Problem of Script Execution Order when upgrading package | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | James Su <suzhe> |
Component: | rpm | Assignee: | Jeff Johnson <jbj> |
Status: | CLOSED WONTFIX | QA Contact: | David Lawrence <dkl> |
Severity: | medium | Docs Contact: | |
Priority: | high | ||
Version: | 7.1 | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2002-01-17 20:32:18 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
James Su
2001-06-28 16:52:30 UTC
You need to distinguish between the upgrade and erase uses in %preun and %postun by looking at argv[1]: %postun if [ $1 == 0 ]; then <this is where the package erase actions are performed> else <this is where the package upgrade actions are performed> endif There are similar, though much more complicated, conventions using $1 and $2 args for %triggerun, see the description of triggers in the rpm-devel package for gory details. But it still doesn't explain why the postun section of the RPM is being run AFTER the newer package is installed (and after the newer package's %post section is run). My customer is experiencing this as well, and it's biten them twice. Do you plan to change this behavior? rpm has always installed before erasing, and this is not going to change. |