Bug 89500
| Summary: | RFE package erasures are not topologically sorted. | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | Gary Benson <gbenson> | ||||||
| Component: | rpm | Assignee: | Paul Nasrat <nobody+pnasrat> | ||||||
| Status: | CLOSED UPSTREAM | QA Contact: | Mike McLean <mikem> | ||||||
| Severity: | medium | Docs Contact: | |||||||
| Priority: | medium | ||||||||
| Version: | 8.0 | CC: | katzj, k.georgiou, mlists, nbudin, rdieter, scop, tim.nelson | ||||||
| Target Milestone: | --- | ||||||||
| Target Release: | --- | ||||||||
| Hardware: | All | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | rpm-4.4.1-11 | Doc Type: | Bug Fix | ||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2006-04-05 18:50:31 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: | |||||||||
| Bug Depends On: | |||||||||
| Bug Blocks: | 150224 | ||||||||
| Attachments: |
|
||||||||
Created attachment 91251 [details]
The first of two test packages
Created attachment 91252 [details]
The second of two test packages
Ah yes, erase ordering has never been implemented in rpm. Deferred until this gets on an rpm roadmap. Should be in rawhide from rpm 4.4.1-11 *** Bug 89740 has been marked as a duplicate of this bug. *** *** Bug 159008 has been marked as a duplicate of this bug. *** Two comments pasted from bug 89740: One from me: ------------- Is this going to be backported to RHEL 3? Is that what you meant by anticipating that it will be supported everywhere? (RHEL3 is rpm-4.2.3-21_nonptl) ------------- ...and a more important one from Ville Skyttä ------------- This is still an issue as of rpm-4.4.2-11 (post-FC5test1 Rawhide) using the specfiles from comments 1 and 2, setting FC5Blocker per Jeremy's request. ------------- Jeremy, I'm afraid I'm missing something.
The reproducer from the initial comment and comments 1 and 2 is still valid, and
can be used to show that the erasures are not expectedly sorted. The order in
which the packages are specified in the "rpm -e" command should not matter ("foo
bar" vs "bar foo") but rpm should order them based on dependencies in the
transaction.
# rpm -ivh foo* bar* && rpm -e foo bar
Preparing... ########################################### [100%]
1:foo ########################################### [ 50%]
2:bar ########################################### [100%]
/var/tmp/rpm-tmp.17400: line 1: /usr/bin/foo: No such file or directory
error: %postun(bar-1.0-1.i386) scriptlet failed, exit status 127
This happens with rpm-4.4.1-22 on FC4 and rpm-4.4.2-15.2 on FC5t3. bar should
be erased before foo but that's not the case here.
Fixed in rpm CVS. |
Description of problem: Prereq dependencies are not honoured at erase time: it seems that rpm uninstalls packages in the reverse of the order specified on the command line. This may cause %postun scriptlets to fail. Version-Release number of selected component (if applicable): rpm-4.1-1.06 How reproducible: Always Steps to Reproduce: 1. Grab the two packages attached to this bug and build them (rpmbuild --rebuild {foo,bar}-1.0-1.src.rpm). Note that bar prereq's foo. 2. Run 'rpm -ivh {foo,bar}-1.0-1.i386.rpm && rpm -e bar foo' to get the message: /var/tmp/rpm-tmp.10259: line 1: /usr/bin/foo: No such file or directory error: %postun(bar-1.0-1) scriptlet failed, exit status 127 3. Run 'rpm -ivh {foo,bar}-1.0-1.i386.rpm && rpm -e foo bar' and note that no error occurs.