How to debug an RPM that will not uninstall

1

I've built an RPM using redline rpm library for java. When I try to uninstall the rpm it says it was removed but when I do a list it is still there and says it is still installed.

Here is the results of my uninstall with as much debug as I know how to give it.

[root@localhost ~]# rpm -e -vvvvv kairosdb
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/Name rdonly mode=0x0
D:  read h#     992 Header SHA1 digest: OK (53816c2a5bea603626b3464fcccee15a95914aab)
D: ========== --- kairosdb-1.0.0-beta-2-4 noarch/linux 0x0
D: opening  db index       /var/lib/rpm/Requirename rdonly mode=0x0
D: ========== recording tsort relations
D: ========== tsorting packages (order, #predecessors, #succesors, tree, depth, breadth)
D:     0    0    0    0    1    0   -kairosdb-1.0.0-beta-2-4.noarch
D: closed   db index       /var/lib/rpm/Requirename
D: closed   db index       /var/lib/rpm/Name
D: closed   db index       /var/lib/rpm/Packages
D: closed   db environment /var/lib/rpm/Packages
D: opening  db environment /var/lib/rpm/Packages joinenv
D: opening  db index       /var/lib/rpm/Packages create mode=0x42
D: mounted filesystems:
D:     i        dev    bsize       bavail       iavail mount point
D:     0 0x0000fd00     4096      1084597      1715537 /
D:     1 0x00000003     4096            0           -1 /proc
D:     2 0x00000000     4096            0           -1 /sys
D:     3 0x0000000c     4096            0           -1 /dev/pts
D:     4 0x00000801     1024        77147        26063 /boot
D:     5 0x00000014     4096        64358        64357 /dev/shm
D:     6 0x00000015     4096            0           -1 /proc/sys/fs/binfmt_misc
D:     7 0x00000016     4096            0           -1 /var/lib/nfs/rpc_pipefs
D: sanity checking 1 elements
D: running pre-transaction scripts
D: computing 123 file fingerprints
D: computing file dispositions
D: opening  db index       /var/lib/rpm/Basenames create mode=0x42
D: ========== --- kairosdb-1.0.0-beta-2-4 noarch-linux 0x0
D:     erase: kairosdb-1.0.0-beta-2-4 has 123 files, test = 0
D: opening  db index       /var/lib/rpm/Name create mode=0x42
D:  read h#     992 Header SHA1 digest: OK (53816c2a5bea603626b3464fcccee15a95914aab)
D: running post-transaction scripts
D: closed   db index       /var/lib/rpm/Basenames
D: closed   db index       /var/lib/rpm/Name
D: closed   db index       /var/lib/rpm/Packages
D: closed   db environment /var/lib/rpm/Packages
D: May free Score board((nil))

I don't see any errors and the files are all still there. Something must have gone wrong because IT DIDN'T WORK! How do I debug this?

EDIT: Additional information: The rpm will uninstall if I use the --noscripts option at uninstall. I tried building the rpm without any scripts and it still doesn't uninstall.

rpm
asked on Super User May 2, 2013 by brianhks • edited May 7, 2013 by brianhks

1 Answer

2

Hopefully you have figured out your problem by now, but the underlying issue is that you have dashes in your version number: 1.0.0-beta-2

redline rpm currently allows you to do this, even though the rpm spec does not allow it. Unfortunately, once an invalid rpm is created, none of the rpm tools give you any way of knowing that, other than strange behavior.

In this case, you should have been able to install the same rpm multiple times without it complaining about there already being an instance installed. And when trying to erase it, it's actually an attempt to run the trigger un and postun scriplets (not the general preun and postun scriptlets that fails almost silent - other than a 255 return code).

Redline should not allow this, and the rpm tool should not attempt to install such an rpm, but that is the current state of things.

-Spencer

answered on Super User Nov 7, 2013 by user270224

User contributions licensed under CC BY-SA 3.0