rpm rollback ignoring rpms - no error output

Posted by John H on Server Fault See other posts from Server Fault or by John H
Published on 2012-08-20T13:36:04Z Indexed on 2012/09/19 15:42 UTC
Read the original article Hit count: 559

Filed under:
|
|

Issue

rpm rollback is not working with a set of repackaged rpms created in the last couple days, but does work with more recent ones.

[root@host1 repackage]# ls -l zsh-4.2.6-*
-rw-r--r-- 1 root root 1788283 Apr 10  2011 zsh-4.2.6-3.el5.i386.rpm
-rw-r--r-- 1 root root 1788691 Aug 18 04:38 zsh-4.2.6-5.el5.i386.rpm
[root@host1 repackage]# rpm -q zsh
zsh-4.2.6-6.el5
[root@host1 repackage]# rpm --test -Uvh --rollback 'Aug 18 01:00'
[root@host1 repackage]# rpm -e zsh
[root@host1 repackage]# 
[root@host1 repackage]# ls -l zsh*
-rw-r--r-- 1 root root 1788283 Apr 10  2011 zsh-4.2.6-3.el5.i386.rpm
-rw-r--r-- 1 root root 1788691 Aug 18 04:38 zsh-4.2.6-5.el5.i386.rpm
-rw-r--r-- 1 root root 1789064 Aug 20 09:06 zsh-4.2.6-6.el5.i386.rpm
[root@host1 repackage]# cp zsh-4.2.6-6.el5.i386.rpm /tmp
[root@host1 repackage]# rpm --test -Uvh --rollback 'Aug 18 01:00'
Rollback packages (+1/-0) to Mon Aug 20 09:02:16 2012 (0x50323558):
Preparing...                ########################################### [100%]
Cleaning up repackaged packages:
    Removing /var/spool/repackage/zsh-4.2.6-6.el5.i386.rpm:
[root@host1 repackage]# ls -l zsh-4.2.6-*
-rw-r--r-- 1 root root 1788283 Apr 10  2011 zsh-4.2.6-3.el5.i386.rpm
-rw-r--r-- 1 root root 1788691 Aug 18 04:38 zsh-4.2.6-5.el5.i386.rpm    
[root@host1 repackage]# cp /tmp/zsh-4.2.6-6.el5.i386.rpm  .
[root@host1 repackage]# rpm  -Uvh --rollback 'Aug 18 01:00'
Rollback packages (+1/-0) to Mon Aug 20 09:06:05 2012 (0x5032363d):
Preparing...                ########################################### [100%]
   1:zsh                    ########################################### [ 50%]
Cleaning up repackaged packages:
    Removing /var/spool/repackage/zsh-4.2.6-6.el5.i386.rpm:
[root@host1 repackage]# rpm --test -Uvh --rollback 'April 9'
[root@host1 repackage]# 

Now, if I run my test commands with -Uvvh I get debug messages to stderror which shows me that rpm reads each of the rpm files in /var/spool/repackage. The only interesting bit is the "expected size" but after searching, the expected size should be different, as it records the files as they are on the filesystem.

D: opening  db environment /var/lib/rpm/Packages joinenv
D: opening  db index       /var/lib/rpm/Packages rdonly mode=0x0
D: locked   db index       /var/lib/rpm/Packages
D: opening  db index       /var/lib/rpm/Installtid rdonly mode=0x0
D: opening  db index       /var/lib/rpm/Pubkeys rdonly mode=0x0
D:  read h#     769 Header sanity check: OK
D: ========== DSA pubkey id 53268101 37017186 (h#769)
D:  read h#      32 Header V3 DSA signature: OK, key ID 37017186
D:  read h#      40 Header V3 DSA signature: OK, key ID 37017186
...
D:  read h#    1753 Header V3 DSA signature: OK, key ID 37017186
D: Expected size:      3628918 = lead(96)+sigs(344)+pad(0)+data(3628478)
D:   Actual size:      3583695
D: /var/spool/repackage/Deployment_Guide-en-US-5.2-11.noarch.rpm: Header V3 DSA signature: OK, key ID 37017186
D: Expected size:      1100789 = lead(96)+sigs(344)+pad(0)+data(1100349)
D:   Actual size:      1109281
D: /var/spool/repackage/NetworkManager-0.7.0-10.el5_5.2.i386.rpm: Header V3 DSA signature: OK, key ID 37017186
D: Expected size:      1098167 = lead(96)+sigs(344)+pad(0)+data(1097727)
D:   Actual size:      1106179
D: /var/spool/repackage/NetworkManager-0.7.0-9.el5.i386.rpm: Header V3 DSA signature: OK, key ID 37017186
D: Expected size:        84351 = lead(96)+sigs(344)+pad(0)+data(83911)
D:   Actual size:        85378
...
D: Expected size:      1788276 = lead(96)+sigs(344)+pad(0)+data(1787836)
D:   Actual size:      1788691
D: /var/spool/repackage/zsh-4.2.6-5.el5.i386.rpm: Header V3 DSA signature: OK, key ID 37017186
D:      --- erase h#1758
D: closed   db index       /var/lib/rpm/Pubkeys
D: closed   db index       /var/lib/rpm/Installtid
D: closed   db index       /var/lib/rpm/Packages
D: closed   db environment /var/lib/rpm/Packages
D: May free Score board((nil))

I am able to copy these rpms out of the repackage directory and if I run them through cpio, extract the files.

I also tried backing up and rebuilding the rpm database - no change.

System Information:
RHEL 5.8
rpm 4.4.2.3

/etc/yum.conf
tsflags=repackage

/etc/rpm/macros
%_repackage_all_erasures 1

© Server Fault or respective owner

Related posts about rhel5

Related posts about rpm