This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 235977 - Can't rollback more than one transaction
Can't rollback more than one transaction
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
6
All Linux
medium Severity medium
: ---
: ---
Assigned To: Panu Matilainen
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-04-11 02:56 EDT by Igor Jagec
Modified: 2008-04-01 06:49 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-04-01 06:49:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Igor Jagec 2007-04-11 02:56:56 EDT
Description of problem:

Rollback feature doesn't work fine. What ever I do, I can't rollback more than 
one transaction. For instance, I had to rollback the 1176242169 transaction I 
yesterday, and what ever I got, it rollbacks only 1176270027 transaction.

Transactions:

1176242169 - ghostscript 
1176242169 - libX11 
1176242169 - libX11-devel 
1176242169 - system-config-printer 
1176242169 - system-config-printer-libs 
1176242169 - xorg-x11-server-Xorg 
1176270027 - selinux-policy 
1176270027 - selinux-policy-targeted

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

# rpmgrep rpm
redhat-rpm-config-8.0.45-9.fc6
rpm-4.4.2-32
rpm-build-4.4.2-32
rpm-devel-4.4.2-32
rpmdevtools-5.3-1.fc6
rpm-libs-4.4.2-32
rpm-python-4.4.2-32


How reproducible:

Every time.
Comment 1 Jeff Johnson 2007-04-11 07:48:36 EDT
Yes, there are likely transactions that will not rollback, dependning on how rpm-4.4.2 is configured.

FWIW, you're likelier to be happier with the --rollback option
in rpm-4.4.6 or later. What has been added is explicit forward
and backward links between packages so that the elements in
transactions that are being rolled back can be explicitly verified.

The transaction id alone is insufficient to verify that all the package
elements necessary to perform a rollback are present. Consider
what happens when /var/spool/repackage/*.rpm files are missing.
Comment 2 Igor Jagec 2007-04-11 09:56:40 EDT
Well, I guess rpm is well configured, I don't know. I haven't had problems when 
I last rollbacked (I think that was on FC4). BTW none of files aren't missing 
in my /var/spool/repackage directory.

BTW what does it mean when you said "explicit forward
and backward links between packages so that the elements in
transactions that are being rolled back can be explicitly verified"? 
Does it mean that I can choose which package to rollback?

I'd like to upgrade to rpm-4.4.6 or later, but I don't know how to do that. I 
even tried once to compile your rpm packages, but I got lots of errors. Do you 
have FC6 packages? Or is there any easy way to compile your packages on FC6?

Thanks Jeff.
Comment 3 Jeff Johnson 2007-04-11 10:18:30 EDT
Forward and backward links as in doubly linked list.

An example is perhaps easiest to explain.

Here's a query on my FC7 box (running rpm-4.4.9):
$ rpm -q --blink popt
popt-1.10.9-0.1.i386.rpm
        <= popt-1.10.8-1.i386.rpm
Note: --blink as in "backward link", not eye blink).

The query shows that popt-1.10.9-0.1.i386.rpm upgraded popt-1.10.8-1.i386.rpm.

So when using --rollback, there better be a repackaged
    popt-1.10.8-1.i386.rpm
which contains a forward link that can be queried like
    rpm -qp --flink /var/spool/repackage/popt-1.10.8-1.i386.rpm

Having a doubly linked list permits rpm --rollback to explicitly check that
all elements necessary to perform a rollback are found. Note that the
general flink/blink relations are many-to-many, not one-to-one as in
a doubly linked list. So its a graph, not a list, etc etc. The goal is to explicitly verify
that all elements necessary to perform a --rollback transaction are actually present.

I do most of my rpm development on FC, all my versions of rpm are known
to run on FC. Feel free to ask for help on <rpm-devel@lists.dulug.duke.edu>
if you'ld like to use --rollback with rpm-4.4.2+.

FWIW, I'm about to actively fix a few problems with --rollback in the next couple of
weeks, would love to have someone willing to actually try the bits out.
Comment 4 Igor Jagec 2007-04-12 03:10:42 EDT
I've installed rpm-4.4.8-1 on my Fedora Rawhide system (I've got lots of errors 
on FC6 when I tried to 'yum localinstall' them) so I would be glad if I can 
help you in testing that new rollback features. See ya in rpm-devel list. 
Cheers!
Comment 5 Igor Jagec 2007-04-12 05:39:30 EDT
I tried to rollback 2 transactions with rpm-4.4.8-1 on my Fedora Rawhide system 
and it works! Thanks Jeff! Here's the output:

# rpm -Uvh --rollback '10 minutes ago'
Rollback goal:  Thu Apr 12 11:25:46 2007 (0x461dfb1a)
Rollback packages (+1/-1) to Thu Apr 12 11:35:21 2007 (0x461dfd59):
Preparing...                ########################################### [100%]
   1:freetype               ########################################### [ 50%]
Cleaning up repackaged packages:
        Removing /var/spool/repackage/freetype-2.3.4-1.fc7.athlon.rpm:
Rollback packages (+1/-0) to Thu Apr 12 11:34:25 2007 (0x461dfd21):
Preparing...                ########################################### [100%]
   1:opera                  ########################################### [ 50%]
Cleaning up repackaged packages:
        Removing /var/spool/repackage/opera-9.20-20070409.6.i386.rpm:
Comment 6 Jeff Johnson 2007-04-12 08:13:58 EDT
The very first think you should check is how many packages have forward/backward links.

You can doo that most easily by examining:
    rpm -qa --blink
output. Any packages that does not have a backward link is either a freshly
installed package, or was not installed by a version of rpm that added backward links.

The 2nd case needs to be addressed in order to verify rollback transactions.

I'm in the process of writing a utility that will retrofit the necessary forward/backward
links, that utility should exist within the next month. Otherwise, install a system and/or
chroot with rpm-4.4.6 or later to insure that forward/backward links are populated.
Comment 7 Jeff Johnson 2007-05-01 19:36:25 EDT
Comment added so that I cind this bug easily.
Comment 8 Red Hat Bugzilla 2007-08-21 01:33:45 EDT
User pnasrat@redhat.com's account has been closed
Comment 9 Panu Matilainen 2007-08-22 02:34:42 EDT
Reassigning to owner after bugzilla made a mess, sorry about the noise...
Comment 10 Panu Matilainen 2008-04-01 06:49:18 EDT
The repackage + rollback support has been removed upstream (next major version),
fixing 4.4.x would be waste of time.

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