Description of problem: This is perhaps a cosmetic problem. Yum says: 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! But in fact, it did not remove the file. Subsequent running of identical command gives same result. Version-Release number of selected component (if applicable): [root@hoho2 Desktop]# yum --version Loading "installonlyn" plugin 3.0 [root@hoho2 Desktop]# OS is updated FC6 How reproducible: Infinitely Steps to Reproduce: 1. see 'Actual results' below 2. 3. Actual results: [root@hoho2 Desktop]# yum erase java-1.5.0-sun-1.5.0.06-1jpp Loading "installonlyn" plugin Setting up Remove Process Resolving Dependencies --> Populating transaction set with selected packages. Please wait. ---> Package java-1.5.0-sun.i586 0:1.5.0.06-1jpp set to be erased --> Running transaction check Setting up repositories Reading repository metadata in from local files --> Processing Dependency: java-1.5.0-sun = 0:1.5.0.06-1jpp for package: java-1.5.0-sun-devel --> Restarting Dependency Resolution with new changes. --> Populating transaction set with selected packages. Please wait. ---> Package java-1.5.0-sun-devel.i586 0:1.5.0.06-1jpp set to be erased --> Running transaction check Dependencies Resolved ============================================================================= Package Arch Version Repository Size ============================================================================= Removing: java-1.5.0-sun i586 1.5.0.06-1jpp installed 84 M Removing for dependencies: java-1.5.0-sun-devel i586 1.5.0.06-1jpp installed 12 M Transaction Summary ============================================================================= Install 0 Package(s) Update 0 Package(s) Remove 2 Package(s) Is this ok [y/N]: y Downloading Packages: Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Removing : java-1.5.0-sun-devel ######################### [1/2] /usr/lib/jvm/java-1.5.0-sun/bin/javac has not been configured as an alternative for javac error: %postun(java-1.5.0-sun-devel-1.5.0.06-1jpp.i586) scriptlet failed, exit status 2 Removing : java-1.5.0-sun ######################### [2/2] /usr/lib/jvm/jre-1.5.0-sun/bin/java has not been configured as an alternative for java error: %postun(java-1.5.0-sun-1.5.0.06-1jpp.i586) scriptlet failed, exit status 2 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! **** Note that yum says 'Dependency Removed: xx Complete! **** However, it did not remove the package. **** Doing it again, gives same answer. [root@hoho2 Desktop]# yum erase java-1.5.0-sun-1.5.0.06-1jpp Loading "installonlyn" plugin Setting up Remove Process Resolving Dependencies --> Populating transaction set with selected packages. Please wait. ---> Package java-1.5.0-sun.i586 0:1.5.0.06-1jpp set to be erased --> Running transaction check Setting up repositories core 100% |=========================| 1.1 kB 00:00 updates 100% |=========================| 1.2 kB 00:00 extras 100% |=========================| 1.1 kB 00:00 Reading repository metadata in from local files primary.xml.gz 100% |=========================| 193 kB 00:01 ################################################## 591/591 --> Processing Dependency: java-1.5.0-sun = 0:1.5.0.06-1jpp for package: java-1.5.0-sun-devel --> Restarting Dependency Resolution with new changes. --> Populating transaction set with selected packages. Please wait. ---> Package java-1.5.0-sun-devel.i586 0:1.5.0.06-1jpp set to be erased --> Running transaction check Dependencies Resolved ============================================================================= Package Arch Version Repository Size ============================================================================= Removing: java-1.5.0-sun i586 1.5.0.06-1jpp installed 84 M Removing for dependencies: java-1.5.0-sun-devel i586 1.5.0.06-1jpp installed 12 M Transaction Summary ============================================================================= Install 0 Package(s) Update 0 Package(s) Remove 2 Package(s) Is this ok [y/N]: y Downloading Packages: Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Removing : java-1.5.0-sun-devel ######################### [1/2] /usr/lib/jvm/java-1.5.0-sun/bin/javac has not been configured as an alternative for javac error: %postun(java-1.5.0-sun-devel-1.5.0.06-1jpp.i586) scriptlet failed, exit status 2 Removing : java-1.5.0-sun ######################### [2/2] /usr/lib/jvm/jre-1.5.0-sun/bin/java has not been configured as an alternative for java error: %postun(java-1.5.0-sun-1.5.0.06-1jpp.i586) scriptlet failed, exit status 2 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! [root@hoho2 Desktop]# Expected results: It probably should say something like: 'Error occurred. Command may not have completed as you wish' 'See diagnostic output above' Additional info:
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.