Bug 82028 - Rollback for transaction containing partial package fails
Rollback for transaction containing partial package fails
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: rpm (Show other bugs)
i686 Linux
high Severity high
: ---
: ---
Assigned To: Paul Nasrat
Mike McLean
Depends On:
  Show dependency treegraph
Reported: 2003-01-16 10:05 EST by James Olin Oden
Modified: 2007-11-30 17:06 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-09-29 15:00:34 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description James Olin Oden 2003-01-16 10:05:24 EST
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 14:41:27 EDT
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 15:33:29 EDT
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 15:00:34 EDT
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.