[Yum] RPM Rollbacks

Creative Innovative innovative_c at yahoo.com
Fri Apr 3 20:52:33 UTC 2009

Hi James,
Thanks for your quick reply.
I just sent my Qs to RPM mailing list, hoping to hear from them.
I took a look at RPM source code, and it seems like
if this macro --->> _rollback_transaction_on_failure
is enabled, and if transaction type is set to RPMTRANS_TYPE_AUTOROLLBACK.
then, RPM's AUTO_ROLLBACK should do its job as advertised.
Here below is a code snippet from RPM source code::
        /* See if we need to rollback on failure */
        rollbackOnFailure = rpmExpandNumeric(
        if (rpmtsGetType(ts) & (RPMTRANS_TYPE_ROLLBACK
            rollbackOnFailure = 0;

I will investigate, if it works as advertised.
I have also been looking at YUM source code, and I dont think YUM sets AUTO_ROLLBACK transaction TYPE, when it creates RPM transaction in python.
I have also looked at yum-complete-transaction utility, so have some idea, of how YUM dumps this transaction file, so that if RPM aborts in the middle of transaction, this file can be utilized to redo the transaction.
If you or some other YUM developer has tried setting AUTO_ROLLBACK transaction type or experimented to see if it works as advertised for rolling back, you can let me know.

--- On Fri, 4/3/09, James Antill <james-yum at and.org> wrote:

From: James Antill <james-yum at and.org>
Subject: Re: [Yum] RPM Rollbacks
To: "Yellowdog Updater, Modified" <yum at lists.baseurl.org>
Cc: innovative_c at yahoo.com
Date: Friday, April 3, 2009, 8:07 PM

 I've removed the devel mailing list from the Cc.

Creative Innovative <innovative_c at yahoo.com> writes:

> Hi All.
> Seth Vidal in this older mail  chain below, has mentioned that 
> RPM no longer supports rollback.
> Is this really TRUE, I would like to know the reason why its NOT

 You might want to ask the RPM maintainers, instead of the yum ones
then? Although I think you'll find that noone has ever
"supported" it,
because it never worked reliably enough for anyone to do so. Removing
it was just removing the false advertising.

> I think, RPM currently supports
> ie, what I mean is, if you have multiple package installs/erases within 1
single RPM transaction, then if there is a failure,
> for any package install/erase, then prior to failure, whatever other
packages that were installed/erased, will be undone. Can someone please confirm

 You can "kill -9" rpm (or remove power etc.), it could not possibly
do anything after this so it could not possibly undo anything after
this type of failure.
 However even in the case of a "recoverable" transaction failure
.... rpm just aborts as is. This is why yum-complete-transaction
 Note current stable version (will become 3.2.23) has the "downgrade"
command, and the current stable yum-utils has yum-debug-restore which
uses it. However this is _not_ the same thing (and doesn't give the
same promises) as a database rollback.

James Antill -- james at and.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.baseurl.org/pipermail/yum/attachments/20090403/38bfa258/attachment.htm>

More information about the Yum mailing list