[cgl_discussion] rpm rollback failed transaction patch...

James Olin Oden joden at malachi.lee.k12.nc.us
Wed May 21 11:14:35 PDT 2003


Hi All,

Presently, rpm's behavior is such that if an rpm in a transaction
fails it will continue trying to deliver the remaining rpms.
In a CGL type environment I don't think that is the right behavior.
So I have produced a patch for rpm that will allow you to configure
rpm such that when a transaction fails it will roll the transaction back.

I have created a website that has binary rpms of rpm 4.2 built with this
patch, and the srpm that built the binary rpms:

	http://lee.k12.nc.us/~joden/misc/patches/rpm/


If you check the recent archives of the rpm-list you will find quite
a bit of discussion concerning the development of this patch.  In short
though it takes the follwoing strategy:

   if rpm is configured to rollback failed transactions and the 
   current transaction is not a rollback transaction: 
       Create a rollback transaction.
       As each element (install or erase) in the currently running
       transaction succeeds add either its repackaged package
       or its db instance to the rollback transaction.
       On failure of any package after entering the package state machine
       run the rollback transaction.


I would appreciate any comments on it, and furthermore would like
to spur others on to further make rpms transactional rollback features
be more robust.  My goal is of course a stable upgrade and backout
mechanism for linux.

Cheers...james





More information about the cgl_discussion mailing list