Created attachment 368203 [details] Proposed patch (backport from upstream) +++ This bug was initially created as a clone of Bug #216221 +++ Description of problem: If one package installation fails in scriptlet (%pre or %post) yum is not notified and still reports the package as installed. Version-Release number of selected component (if applicable): rpm-4.4.2.3-18.el5 yum-3.2.22-20.el5 How reproducible: Always Steps to Reproduce: 1. build foo and bar from attached src rpm 2. yum localinstall --nogpgcheck -y foo-1.0-1.noarch.rpm bar-1.0-1.noarch.rpm Actual results: Setting up Local Package Process Examining foo-1.0-1.noarch.rpm: foo-1.0-1.noarch Marking foo-1.0-1.noarch.rpm to be installed Examining bar-1.0-1.noarch.rpm: bar-1.0-1.noarch Marking bar-1.0-1.noarch.rpm to be installed Resolving Dependencies --> Running transaction check ---> Package bar.noarch 0:1.0-1 set to be updated ---> Package foo.noarch 0:1.0-1 set to be updated --> Finished Dependency Resolution Dependencies Resolved ======================================================================== Package Arch Version Repository Size ======================================================================== Installing: bar noarch 1.0-1 /bar-1.0-1.noarch 0.0 foo noarch 1.0-1 /foo-1.0-1.noarch 0.0 Transaction Summary ======================================================================== Install 2 Package(s) Update 0 Package(s) Remove 0 Package(s) Downloading Packages: Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction error: %pre(bar-1.0-1.noarch) scriptlet failed, exit status 1 error: install: %pre scriptlet failed (2), skipping bar-1.0-1 Installing : foo 2/2 Installed: bar.noarch 0:1.0-1 foo.noarch 0:1.0-1 Complete! Expected results: Setting up Local Package Process Examining foo-1.0-1.noarch.rpm: foo-1.0-1.noarch Marking foo-1.0-1.noarch.rpm to be installed Examining bar-1.0-1.noarch.rpm: bar-1.0-1.noarch Marking bar-1.0-1.noarch.rpm to be installed Resolving Dependencies --> Running transaction check ---> Package bar.noarch 0:1.0-1 set to be updated ---> Package foo.noarch 0:1.0-1 set to be updated --> Finished Dependency Resolution Dependencies Resolved ======================================================================== Package Arch Version Repository Size ======================================================================== Installing: bar noarch 1.0-1 /bar-1.0-1.noarch 0.0 foo noarch 1.0-1 /foo-1.0-1.noarch 0.0 Transaction Summary ======================================================================== Install 2 Package(s) Update 0 Package(s) Remove 0 Package(s) Downloading Packages: Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Error in <unknown> scriptlet in rpm package bar-1.0-1.noarch error: %pre(bar-1.0-1.noarch) scriptlet failed, exit status 1 error: install: %pre scriptlet failed (2), skipping bar-1.0-1 Installing : foo 2/2 Installed: foo.noarch 0:1.0-1 Failed: bar.noarch 0:1.0-1 Complete! Additional info: yum-3.2.22 contains the required code but relies on the notification taht is present upstream in rpm 4.6. The proposed patch here attached is a backport of the notification for failed scriptlet in rpm 4.4 so that yum rightfully reports the package that failed in scriptled.
Created attachment 368205 [details] example foo package
Created attachment 368206 [details] example bar package
Saw a similar issue on RHEL5.5. When will this patch be available for download? Thanks.
This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unfortunately unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2012-0283.html