Bug 82028 - Rollback for transaction containing partial package fails
Summary: Rollback for transaction containing partial package fails
Alias: None
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: rpm
Version: 2.1
Hardware: i686
OS: Linux
Target Milestone: ---
Assignee: Paul Nasrat
QA Contact: Mike McLean
Depends On:
TreeView+ depends on / blocked
Reported: 2003-01-16 15:05 UTC by James Olin Oden
Modified: 2007-11-30 22:06 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2005-09-29 19:00:34 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description James Olin Oden 2003-01-16 15:05:24 UTC
Description of problem:

If you install several packages as one trasaction and one 
of the packages to be installed fails in its %post scriptlet, 
when you go to rollback this transaction none of the upgraded
packages will rollback.  The implication is that the rollback feature
is only useful if everything goes OK.

Also, note that the expected behavior is that the sucessfully 
installed RPM's would be able to be rolled back, but the 
partial packages would not be.  Instead no packages can be 
rolled back; it is as if that transaction was never recorded 
in the RPM database.

Version-Release number of selected component (if applicable):  4.04

How reproducible:  Every Time

Steps to Reproduce:

Given packages A and B where package A is set to exit with a positive
error code in its %post scriptlet.

1.  Run:

       rpm -Uvh --repackage A B

    This will fail, but B will be successfully installed.

2.  Try to rollback to an hour ago:

       rpm -Fvh --rollback '1 hour ago'
Actual results:

Provided no other rpm transactions have occured in the last hour
nothing will happen; neither A or B will be rolled back.

Expected results:

I expected B to be rolled back, and A to be left on the system.

Additional info:

This bug is related to enhancement request 82024, where a request
to be able query for partially installed packages has been made.
The relation is, even if this bug is fixed, a method to find out
what packages were partially installed is still necessary.

Comment 5 Jeremy Katz 2005-04-19 18:41:27 UTC
James -- is this resolved in newer releases (I seem to remember you had a patch
for it once upon a time)?

Comment 6 James Olin Oden 2005-04-19 19:33:29 UTC
No it was never resolved officially.  I created the autorollback patch which 
rollback the failed transaction automatically.  I have a set of patches for 
RHEL 3 which we use in production:


But AFAIK if you don't use this patch, or enable the feature, a failed 
transaction cannot be rolled back properly.

Also, those patches are in the HEAD of rpm.


Comment 8 Paul Nasrat 2005-09-29 19:00:34 UTC
Improved rollback in rpm HEAD/4.4.x branches.  This is not going to get
backported to AS 2.1 as it is in maintenance mode atm.

Note You need to log in before you can comment on or make changes to this bug.