Bug 216221
| Summary: | Says it deleted Dependency, but with scriptlet exit status 2, it really did not | |||
|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Bob Gustafson <bobgus> | |
| Component: | rpm | Assignee: | Panu Matilainen <pmatilai> | |
| Status: | CLOSED RAWHIDE | QA Contact: | ||
| Severity: | high | Docs Contact: | ||
| Priority: | medium | |||
| Version: | rawhide | CC: | mattdm, michal | |
| Target Milestone: | --- | |||
| Target Release: | --- | |||
| Hardware: | All | |||
| OS: | Linux | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | Bug Fix | ||
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 533831 (view as bug list) | Environment: | ||
| Last Closed: | 2008-10-16 17:09: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: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 533831 | |||
|
Description
Bob Gustafson
2006-11-17 21:24:30 UTC
Although not a fix for the Complete! message, the fix for the troublesome erase is: [root@hoho2 jboss]# rpm -e --nopostun java-1.5.0-sun-devel-1.5.0.06-1jpp.i586 [root@hoho2 jboss]# rpm -e --nopostun java-1.5.0-sun-1.5.0.06-1jpp.i586 As a test: [root@hoho2 jboss]# yum erase java-1.5.0-sun-1.5.0.06-1jpp Loading "installonlyn" plugin Setting up Remove Process No Match for argument: java-1.5.0-sun-1.5.0.06-1jpp No Packages marked for removal [root@hoho2 jboss]# unfortunately scriptlet errors do not cause the transaction to return an error. Therefore, there is no way for yum to know anything untoward happened w/o going back and checking each package. If we can get scriptlet errors to result in a transaction error, or some kind of warning then we could act on it. but that's an rpm thing. There does seem to be a need for closer coordination between rpm contributors and yum contributors. Is there an easy way to re-file this bug against rpm? What is printing out error: %postun(java-1.5.0-sun-1.5.0.06-1jpp.i586) scriptlet failed, exit status 2 Is this coming directly from the scriptlet? From rpm? If yum is a wrapper around rpm, it seems like this error status could be captured in yum.. yum isn't a wrapper around rpm. Yum uses the rpm python libraries. That's specifically NOT a wrapper. I'll be happy to reassign this to rpm, but I assure you, they know about it. Since yum does not know whether its minions are acting successfully, it should not print out the end messages: Removed: java-1.5.0-sun.i586 0:1.5.0.06-1jpp Dependency Removed: java-1.5.0-sun-devel.i586 0:1.5.0.06-1jpp Complete! !!! yum gets some error messages from the transaction. It just doesn't get scriptlet errors. So it reads the error codes it does get back. They say all clear, hence yum's response. *** Bug 228771 has been marked as a duplicate of this bug. *** User pnasrat's account has been closed Reassigning to owner after bugzilla made a mess, sorry about the noise... This isn't just a cosmetic problem, as it can cause users relying on reports and log files to think that security updates have been applied when they haven't. Moving from fc6 to devel -- this problem just struck with xulrunner in rawhide. And that demonstrates that it's not just post-script failure issues, but can be internal RPM errors as well. The specific directory/symlink bug needs fixin', but really, I'm more concerned about the erroneous reporting overall. Also, I suggest also changing bug summary to something like: rpm python layer doesn't give enough information about failure to be useful Um, anyone got something more succinct? The xulrunner case was very different actually: it wasn't a scriptlet error but a cpio error due to replacing directory with a symlink (or the other way around). The python layer gets notified of CPIO/UNPACK errors but it's not like it (or rpm itself) can do anything about it, the rpm transaction is not unlike a trainwreck in progress - it doesn't stop until it stops no matter what gets crushed in the process ;) That said, the scriptlet failure issue is going to get addressed in couple of ways: 1) let non-pre scriptlets fail without leaving old junk behind 2) add better means of reporting the failures to user 1) might even make it to F9, 2) will have to wait for next major rpm version Changing version to '9' as part of upcoming Fedora 9 GA. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping Ok, here's what rpm does now (upstream, not in rawhide just yet): - %pre and %preun scriptlets exiting with non-zero code cause install/erase to fail just like before. This behavior needs to be preserved as various packages use that to prevent install/uninstall on some conditions. - non-zero exit code from other scriptlets is treated as a warning only (ie %postun failing will log a warning but the package will get removed anyway) - scriptlets dying on signals and other "abnormal" ways are still treated as errors - for all scriptlet errors, RPMCALLBACK_SCRIPT_ERROR notification is issued to the callback, with the tag of the failing script passed in the "amount" parameter and "total" parameter containing RPMRC_OK / RPMRC_FAIL to signal whether rpm treated it as a warning or error In rawhide now. |