Hide Forgot
Description of problem: When QE started running TPS reports on my package hwloc, they noticed it was not cleaning itself up upon removal. This was caused by installing both arches, hwloc.ppc64 and hwloc.ppc, then removing them together. Version-Release number of selected component (if applicable): rpm.ppc64 4.8.0-14.el6 yum.noarch 3.2.29-5.el6 How reproducible: always [root@ibm-js12-03 ~]# yum install -y hwloc.ppc64 hwloc.ppc Loaded plugins: product-id, subscription-manager Updating Red Hat repositories. INFO:rhsm-app.repolib:repos updated: 0 Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package hwloc.ppc 0:1.1-0.1.el6 will be installed ---> Package hwloc.ppc64 0:1.1-0.1.el6 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================Installing: hwloc ppc 1.1-0.1.el6 beaker-Server 1.0 M hwloc ppc64 1.1-0.1.el6 beaker-Server 1.0 M Transaction Summary ================================================================================Install 2 Package(s) Total download size: 2.0 M Installed size: 4.9 M Downloading Packages: (1/2): hwloc-1.1-0.1.el6.ppc.rpm | 1.0 MB 00:00 (2/2): hwloc-1.1-0.1.el6.ppc64.rpm | 1.0 MB 00:00 --------------------------------------------------------------------------------Total 12 MB/s | 2.0 MB 00:00 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : hwloc-1.1-0.1.el6.ppc64 1/2 Installing : hwloc-1.1-0.1.el6.ppc 2/2 duration: 193(ms) Installed products updated. Installed: hwloc.ppc 0:1.1-0.1.el6 hwloc.ppc64 0:1.1-0.1.el6 Complete! [root@ibm-js12-03 ~]# rpm -qf /usr/bin/hwloc-bind hwloc-1.1-0.1.el6.ppc64 hwloc-1.1-0.1.el6.ppc [root@ibm-js12-03 ~]# file /usr/bin/hwloc-bind /usr/bin/hwloc-bind: ELF 64-bit MSB executable, 64-bit PowerPC or cisco 7500, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped [root@ibm-js12-03 ~]# yum erase -y hwloc.ppc64 hwloc.ppc Loaded plugins: product-id, subscription-manager Updating Red Hat repositories. INFO:rhsm-app.repolib:repos updated: 0 Setting up Remove Process Resolving Dependencies --> Running transaction check ---> Package hwloc.ppc 0:1.1-0.1.el6 will be erased ---> Package hwloc.ppc64 0:1.1-0.1.el6 will be erased --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================Removing: hwloc ppc 1.1-0.1.el6 @beaker-Server 2.4 M hwloc ppc64 1.1-0.1.el6 @beaker-Server 2.5 M Transaction Summary ================================================================================Remove 2 Package(s) Installed size: 4.9 M Downloading Packages: Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Erasing : hwloc-1.1-0.1.el6 1/2 Erasing : hwloc-1.1-0.1.el6 2/2 duration: 193(ms) Installed products updated. Removed: hwloc.ppc 0:1.1-0.1.el6 hwloc.ppc64 0:1.1-0.1.el6 Complete! [root@ibm-js12-03 ~]# rpm -qf /usr/bin/hwloc-bind file /usr/bin/hwloc-bind is not owned by any package [root@ibm-js12-03 ~]# file /usr/bin/hwloc-bind /usr/bin/hwloc-bind: ELF 64-bit MSB executable, 64-bit PowerPC or cisco 7500, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped [root@ibm-js12-03 ~]# I expected the file /usr/bin/hwloc-bind to be removed.
Ack, easily reproduced. There are several, more or less subtle things at play here. Time's getting a bit short for 6.1 but lets see...
Unfortunately, my package hwloc is being poked for updates on resolving this TPS issue. So I am raising the priority on this bug. Sorry for the inconvenience. Cheers, Don
Oh, I'm only glad this was found, the file removal logic is flawed and technically this problem exists in every single "multilib aware" rpm version. Whether it happens depends on the exact packages being removed and their relations, and the issue has been largely masked in older rpm versions due to other flaws. I'm looking into it, but this is an area where you do NOT want a last-minute rushed-in patch as mistakes here could have far more severe consequences (broken systems, data loss) than a couple of files left behind.
Okay... ACK for fixing the erase ordering for this case in 6.1. Most of the time package dependencies take care of secondary architecture getting removed first but when such dependencies are not present, such as here, rpm needs to arrange the preferred order by other means. Which in turn gets the files removed without having to mess with the file removal logic.
Fixed in rpm-4.8.0-16.el6
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-0739.html