Bug 10038 - rpm -U runs post-install before post-uninstall
Summary: rpm -U runs post-install before post-uninstall
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 6.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-03-07 18:46 UTC by Marc MERLIN
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-03-08 19:10:15 UTC
Embargoed:


Attachments (Terms of Use)
RPM patch to run post-uninst before post-inst (2.65 KB, patch)
2000-03-07 19:31 UTC, Marc MERLIN
no flags Details | Diff

Description Marc MERLIN 2000-03-07 18:46:22 UTC
While this is a known behavior (actually a design feature I'm told), it's
very counter intuitive, and basically a headacke for package maintainers.
I scanned the bugzilla database, and apparently I'm the first one to log
this here, sorry if this is a dupe

While several people (Ted T'so, HJ Lu, and me) have had an Email discussion
with a few RH employees, Tim Powers recommended that I log this into
bugzilla, so here it is:
The current RPM behavior forces the RPM packager to explicitely handle
package upgrades differently than package uninstalls (by looking up $1).

What most people expect (third party package maintainers, and even some RH
employees who didn't seem to know about the RPM behavior), and what other
package tools like debian's do during an upgrade is:
- uninstall old package (run post-uninst)
- install new package (run post-inst)

Because RPM installs the new package first and then lets the old package
run its post-uninst, the old package may try to clean things that are going
to break the new package (which it can't even know about since the new
package didn't exist back then). If you think of a package that cleans
tables from a database, even if it's written to know about checking $1 for
an upgrade, it has no way to know which tables can be safely removed after
the new package has been installed
The other way around, the old package first removes everything (including
tables), and the new package installs what it needs. This way the old
package doesn't need to know what the new package does or needs, which is
the way it should be.

Considering the current state of RPM packages wrt this issue, I'd be very
surprised if making the switch would break anything, and if something
should break, I'm not sure that it'd be any worse than the current state
of affairs

Comment 1 Marc MERLIN 2000-03-07 19:31:59 UTC
Created attachment 146 [details]
RPM patch to run post-uninst before post-inst

Comment 2 Jeff Johnson 2000-03-08 19:10:59 UTC
There's no way that rpm can change the install/remove order because of
the number of legacy packages that are currently deployed.

Apply patch at your own risk.


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