RPM

Yum reports package installed even if scriptled failed [NEEDINFO]

Bug #651436 reported by Jeff Johnson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
RPM
New
Undecided
Unassigned
Fedora
Fix Released
Medium

Bug Description

tracker

Tags: install yum
Revision history for this message
In , Olivier (olivier-redhat-bugs) wrote :
Download full text (3.8 KiB)

Created attachment 368203
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 ...

Read more...

Revision history for this message
In , Olivier (olivier-redhat-bugs) wrote :

Created attachment 368205
example foo package

Revision history for this message
In , Olivier (olivier-redhat-bugs) wrote :

Created attachment 368206
example bar package

Revision history for this message
In , Gopinath (gopinath-redhat-bugs) wrote :

Saw a similar issue on RHEL5.5. When will this patch be available for download?

Thanks.

Revision history for this message
In , RHEL (rhel-redhat-bugs) wrote :

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.

Jeff Johnson (n3npq)
tags: added: install yum
Revision history for this message
In , errata-xmlrpc (errata-xmlrpc-redhat-bugs) wrote :

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

Changed in fedora:
importance: Unknown → Medium
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.