Bug 548448 - RHNS snapshot rollback does not work when a package was split in later versions
Summary: RHNS snapshot rollback does not work when a package was split in later versions
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Clients
Version: 0.7
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On: 524237
Blocks: space08
TreeView+ depends on / blocked
 
Reported: 2009-12-17 13:46 UTC by Miroslav Suchý
Modified: 2014-01-21 06:16 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 524237
Environment:
Last Closed: 2010-02-16 12:56:05 UTC
Embargoed:


Attachments (Terms of Use)

Description Miroslav Suchý 2009-12-17 13:46:30 UTC
+++ This bug was initially created as a clone of Bug #524237 +++

Description of problem:

fipscheck was split into multiple packages to prevent multi-arch problems. This now interferes with the snapshot rollback

How reproducible:

Try to rollback to an old version of the fipscheck package

Steps to Reproduce:

* Assume you have fipscheck-1.0.3-1.el5.i386.rpm installed on the system (I installed it manually)

* Do a yum update fipscheck which also pulls fipscheck-libs as a dependency.

* Now, you have:
# rpm -qa | grep fipscheck
fipscheck-1.2.0-1.el5
fipscheck-lib-1.2.0-1.el5

Goto the WebUI and schedule the Rollback for this package snapshot. While scheduling you see:

Package   Current Version   Snapshot Version   Difference
fipscheck 1.2.0-1.el5 1.0.3-1.el5 Current profile newer
fipscheck-lib 1.2.0-1.el5   Current profile only

The Rollback has been scheduled correctly as above.

The actual action that is scheduled is:
Changes Scheduled:

   * Replace fipscheck-1.2.0-1.el5 with fipscheck-1.0.3-1.el5
   * Remove fipscheck-lib-1.2.0-1.el5

Now do a rhn_check -vvv on the system and you get:

D: Searching for installed package to remove: ('fipscheck-1.2.0-1.el5',)
D: Found 1 package(s) to remove
D: Searching for installed package to remove: ('fipscheck-lib-1.2.0-1.el5',)
D: Found 1 package(s) to remove
Package fipscheck is obsoleted by fipscheck-lib, trying to install fipscheck-lib-1.2.0-1.el5.i386 instead
D: opening  db index       /var/lib/rpm/Requirename rdonly mode=0x0
D: opening  db index       /var/lib/rpm/Providename rdonly mode=0x0
D: opening  db index       /var/lib/rpm/Basenames rdonly mode=0x0
fipscheck-lib-1.2.0-1.el5.i386 from rhel-i386-server-5 has depsolving problems
 --> Missing Dependency: /usr/bin/fipscheck is needed by package fipscheck-lib-1.2.0-1.el5.i386 (rhel-i386-server-5)
D: closed   db index       /var/lib/rpm/Providename
D: closed   db index       /var/lib/rpm/Requirename
D: closed   db index       /var/lib/rpm/Basenames
D: closed   db index       /var/lib/rpm/Packages
D: closed   db environment /var/lib/rpm/Packages
D: May free Score board((nil))
D: Error: Missing Dependency: /usr/bin/fipscheck is needed by package fipscheck-lib-1.2.0-1.el5.i386 (rhel-i386-server-5)
D: May free Score board((nil))
D: Sending back response (18, "Failed: packages requested raised dependency problems: [u'Missing Dependency: /usr/bin/fipscheck is needed by package fipscheck-lib-1.2.0-1.el5.i386 (rhel-i386-server-5)']", {'version': '1', 'name': 'failed_deps'})

Now, if you try the same manually you will get:

# rpm -ivh fipscheck-1.0.3-1.el5.i386.rpm
error: Failed dependencies:
fipscheck < 1.2.0-1 conflicts with fipscheck-lib-1.2.0-1.el5.i386

# rpm -qp --provides fipscheck-1.0.3-1.el5.i386.rpm
libfipscheck.so.1  
fipscheck = 1.0.3-1.el5

Actual results:

Rollback fails

Expected results:

Rollback shall succeed

Additional info:

fipscheck-1.2.0-1.el5 needs fipscheck-lib-1.2.0-1.el5 and we have a action which will remove fipscheck-lib-1.2.0-1.el5 and that's causing this error message.

Comment 1 Miroslav Suchý 2009-12-18 09:44:25 UTC
Fix commited as 721fb1e282395f1c8f9719f45c24c5382805cac6

I introduced new action "r" as rollback, which do not check dependecies and obsoletes. And all "i" as install in runTransaction (which is called directly only for rollback) are flipped to "r".
Original method runTransaction has been renamed to _runTransaction.

Comment 2 Miroslav Suchý 2010-01-15 11:58:43 UTC
syntax error fixed by commit d2ae8d115427100dce3e68f752faafc93f974353

Comment 3 Michael Mráka 2010-02-16 12:59:06 UTC
Spacewalk 0.8 has been released


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