|Summary:||rpm -e commits changes even on error|
|Product:||[Fedora] Fedora||Reporter:||alvin thompson <al>|
|Component:||rpm||Assignee:||Jeff Johnson <jbj>|
|Status:||CLOSED RAWHIDE||QA Contact:|
|Version:||rawhide||CC:||aleksey, barryn, p.van.egdom, wtogami|
|Fixed In Version:||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|Last Closed:||2004-10-05 01:37:11 UTC||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
|Bug Depends On:|
Description alvin thompson 2004-04-09 19:30:50 UTC
From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040312 Epiphany/1.1.12 Description of problem: if multiple versions of a package are installed, rpm -e behavior is very bad if ambiguities exist: [root@t2 root]# rpm -q kernel kernel-2.6.4-1.300 kernel-2.6.3-126.96.36.199.1 kernel-2.6.4-1.303 kernel-2.6.4-1.305 kernel-2.6.5-1.308 kernel-2.6.5-1.309 [root@t2 root]# rpm -e kernel-2.6.4 error: "kernel-2.6.4" specifies multiple packages [root@t2 root]# rpm -q kernel kernel-2.6.3-188.8.131.52.1 kernel-2.6.4-1.303 kernel-2.6.4-1.305 kernel-2.6.5-1.308 kernel-2.6.5-1.309 note that one of the packages was removed, anyway. rpm should not commit changes when an error is presented and never when the results would be arbitrary, as in this case. Version-Release number of selected component (if applicable): rpm-4.3.1-0.1 How reproducible: Always Steps to Reproduce: 1. see above 2. 3. Additional info:
Comment 1 Jeff Johnson 2004-04-09 22:35:52 UTC
A failure of "rpm -e" when multiple packages installed fails immediately w/o attempting any operation. There's no way that the "rpm -e" did anything.
Comment 2 alvin thompson 2004-04-11 19:09:39 UTC
just saying "There's no way that the "rpm -e" did anything" does not make it true. certainly, what you described is the way it *should* work, but it's not working that way. that's why this bug is open. look more closely at the printout; it is verbatim. this bug has been experimentally verified not only by me, but by others on the #fedora IRC channel. i've been using redhat linux since '96; please don't just assume it's operator error. there is another bug (i forget the number) where if multiple versions of the same package are installed, 'rpm -e' removes common files. the bug may be related in some way.
Comment 3 Jeff Johnson 2004-04-12 02:11:58 UTC
You list the display output, not whether the pkg is actually installed. You also do not identify whether other processes are running. Do you have a rproducer? Hearsay claims from an irc channel cannot be reproduced ...
Comment 4 alvin thompson 2004-04-12 16:49:40 UTC
once again, read the output. you'll notice that the first command is 'rpm -q kernel'. the 'rpm -q kernel' command lists the currently installed kernel packages. if you look at the version numbers, you will notice that they follow the upgrade path of up2date, so perhaps the problem lies there. it is reasonable to assume that i've booted from each kernel at least once (i have). as you should know, if there were other processes running that required a lock on the rpm database, the 'rpm -e' process would have blocked until the lock was available. as i'm sure you also know, this was a problem with the last few redhat/fedora distros as the lock would sometimes not get released and it required the user to manually 'kill -9' the rpm process and rebuild the database. this did *not* happen in this case; there have been no problems with anything regarding package management on this computer. in fact, this machine is for the most part a clean installation w/ updates. if you really think it's relevant, i booted, logged into gnome, opened a terminal, became root (su -) and ran the command. gaim was also running. all internet server services are disabled on this box. any processes running were assosiated with this described state. sorry, the others that comfirmed the bug are not on the IRC channel right now. however, it can hardly be called heresay as i--the submitter of this bug--had this problem and can still reproduce it. i reproduced the problem with a different kernel version. note the strange behavior when i run the command a second time. something is certainly not right here: [root@t2 up2date]# rpm -q kernel kernel-2.6.3-184.108.40.206.1 kernel-2.6.5-1.309 kernel-2.6.5-1.315 [root@t2 up2date]# rpm -q kernel-2.6.5 kernel-2.6.5-1.309 kernel-2.6.5-1.315 [root@t2 up2date]# rpm -e kernel-2.6.5 error: "kernel-2.6.5" specifies multiple packages [root@t2 up2date]# rpm -q kernel-2.6.5 kernel-2.6.5-1.315 [root@t2 up2date]# rpm -e kernel-2.6.5 error: Failed dependencies: kernel >= 2.6.4-1.300 is needed by (installed) policy-1.10.2-5 kernel >= 2.6.4-1.300 is needed by (installed) policy-sources-1.10.2-5 after the (first) 'error' line is given, there is a long pause where the command is still working on something. that is what originally made me suspicious. i strongly suggest you find and fix this bug, as it could lead to major problems if people accidentally remove all versions of a package on a system, especially the kernel. it may not look good if this bug were submitted but ignored because someone didn't think is was real...
Comment 5 Aleksey Nogin 2004-04-14 09:09:49 UTC
I tried reproducing it - and indeed, I see it too. # rpm -q rpm rpm-4.3.1-0.2 # rpm -q kernel kernel-2.6.5-1.315 kernel-2.6.5-1.319 # rpm -e kernel-2.6.5 Ð¾ÑÐ¸Ð±ÐºÐ°: "kernel-2.6.5" Ð·Ð°Ð´Ð°ÐµÑ Ð½ÐµÑÐºÐ¾Ð»ÑÐºÐ¾ Ð¿Ð°ÐºÐµÑÐ¾Ð² rpm -q kernel # rpm -q kernel kernel-2.6.5-1.319 #
Comment 6 Warren Togami 2004-05-06 22:04:44 UTC
[root@ibmlaptop tmp]# rpm -q kernel-source kernel-source-2.6.5-1.319 kernel-source-2.6.5-1.322 kernel-source-2.6.5-1.326 kernel-source-2.6.5-1.327 kernel-source-2.6.5-1.349 [root@ibmlaptop tmp]# rpm -e kernel-source error: "kernel-source" specifies multiple packages At this point it gets stuck for 2-3 minutes with 100% CPU and disk clicking like crazy. Then... [root@ibmlaptop tmp]# rpm -q kernel-source kernel-source-2.6.5-1.322 kernel-source-2.6.5-1.326 kernel-source-2.6.5-1.327 kernel-source-2.6.5-1.349
Comment 7 Warren Togami 2004-05-18 07:26:30 UTC
rpm did not exhibit this behavior in RH9. (Just more info.)
Comment 8 Jeff Johnson 2004-10-05 01:37:11 UTC
This has been fixed for a couple months at least: [root@wellfleet ~]# rpm -q kernel kernel-2.6.8-1.533 kernel-2.6.8-1.541 kernel-2.6.8-1.538 kernel-2.6.8-1.590 # rpm -e kernel-2.6.8 error: "kernel-2.6.8" specifies multiple packages # rpm -q kernel kernel-2.6.8-1.533 kernel-2.6.8-1.541 kernel-2.6.8-1.538 kernel-2.6.8-1.590 # rpm -q rpm rpm-4.3.2-8