[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

RE: Rollback and atomic transactions


I'll definitely play with the patch you and Jeff have created and send
feedback/patches as neccesary.  Thanks for your responses.


"No robes, el gobierno odia la competencia"

-----Original Message-----
From: James Olin Oden [mailto:joden@malachi.lee.k12.nc.us] 
Sent: Thursday, October 16, 2003 1:19 PM
To: rpm-list@redhat.com
Subject: Re: Rollback and atomic transactions

On Thu, 16 Oct 2003 Joshua_Giles@Dell.com wrote:

> All,
> What is the method of "rollback" for installation or with rpm 
> transactions? For example, I have 3 rpm packages: pkg1.rpm, pkg2.rpm, 
> pkg3.rpm I install via `rpm -ivh <package_list>`.
> If one fails i.e. a pre-install script (returns 1) that package is not
> installed.  However, I want all packages of a transaction to rollback if 1
> or more fail.  What is the best way to go about this via rpm?
Unless Jeff, has fixed this, if one of the packages in a transaction fails 
to install (say it does in %pre or %post), then the transaction doesn't 
exist in the rpmdb.  Which means that you can't rollback a failed 
transaction.  bugzilla report here:  


There is a another wrinkle, and you have mentioned it implicitly, RPM
delivers rpms on a best effort basis, so if all dependecies match up and the
right amount of disk space is available, once RPM starts 
delivering packages in a transaction to the system, if any of these packages
fail to install it will continue trying to install the rest. If you are of
the mind that you really want to rollback the failed 
transaction, you probably want to minimize what you have to rollback and
would prefer rpm not deliver the remaining rpms in the transaction.

Well, because I have this unhealthy preoccupatiion with rpm rollbacks (and
all other ismorphism's of inverse functions (-;, I, with much help from 
Jeff Johnson, wrote the RPM autorollback patch:


Which allows rpm to be configured to:

	1) immediately stop running a failed transaction at the first 
	   point of failure.
	2) automatically rollback the part of the transaction that 

It definately needs some more work, but I would also say that if you 
willing to QA it a little (i.e. seeing is believing) and understand its
short commings (documented on the web page), it might be just want you 

> I do realized there is a "--repackage" then a "--rollback" sequence I 
> can use when upgrading rpms, but what about when no such package(s) 
> exists?
Are you asking about the removal of packages that did not exist at the 
time to which you are rolling back?  If so, you need to set the macro
%_unsafe_rollbacks to the time time after which you wish to allow rolling
back installs (which is an erase (-;).  The time should be in seconds since
epoch and set to something like a date after your initial install.

> Is RPM transaction support limited to dependency resolution only? And 
> it has no support once the installation starts?
And understand your question.  Could you elaborate?

> None of the documentation that is available is precise enough in 
> explaining what transaction can or cannot do.
Yeah, its for practical purposes undocumented.  Maybe someday it won't be.
But feel free to ask questions and someone should be able to help you.

> Any help in this regard is greatly appreciated.
I hope this was helpful (-: 

> -Josh
> _______________________________________________
> Rpm-list mailing list
> Rpm-list@redhat.com https://www.redhat.com/mailman/listinfo/rpm-list

Rpm-list mailing list
Rpm-list@redhat.com https://www.redhat.com/mailman/listinfo/rpm-list

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]