Red Hat Bugzilla – Bug 494897
yum-complete-transaction not behaving correctly on an unfinished transaction
Last modified: 2014-01-21 01:12:42 EST
Created attachment 338730 [details]
the output from yum-complete-transaction that tries to remove 685 packages
Description of problem:
When running yum-complete-transaction, yum attempts to delete basically my entire system: 685 rpms after all dependencies are resolved.
Version-Release number of selected component (if applicable):
# rpm -q yum
# yum --version
Installed: yum-3.2.19-18.el5.noarch at 2009-02-18 19:50
Built : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> at 2008-11-25 22:35
Committed: James Antill <firstname.lastname@example.org> at 2008-11-25 22:00
Installed: yum-metadata-parser-1.1.2-2.el5.x86_64 at 2008-05-22 15:06
Built : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> at 2008-01-18 17:42
Committed: James Antill <email@example.com> at 2008-01-18 22:00
Installed: rpm-220.127.116.11-9.el5.x86_64 at 2009-02-18 19:49
Built : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> at 2008-12-03 06:40
Committed: Panu Matilainen <firstname.lastname@example.org> at 2008-12-02 22:00
Installed: yum-rhn-plugin-0.5.3-30.el5.noarch at 2009-02-18 19:58
Built : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> at 2008-11-11 20:34
Committed: Pradeep Kilambi <email@example.com> at 2008-11-11 22:00
I believe I've actually got this one captured and reproduced on a system here at my desk right now. I have been reluctant to clean it up and attempt to reproduce from scratch again (in case we want to collect more information from the current state), but I know how I got to this point, so I'm pretty confident it should be readily reproducible.
Steps to Reproduce:
1. have a /boot with very little free space left
2. run a "yum update" that pulls in a kernel package as an available update
3. yum successfully resolves all dependencies
4. yum successfully downloads all packages for the update
5. yum runs the transaction test and aborts with error messages about not enough free space on /boot to install the update kernel
6. remove a kernel package to free up some space on /boot
7. run yum-complete-transaction
yum-complete-transaction doesn't seem to run any of the "installs" from the unfinished transaction, it simply runs all the "erases". In this case, it resolves all dependencies for those erases, and winds up pulling in 685 packages that it wants to remove...effectively hosing the entire system.
yum-complete-transaction runs all "installs" and then all "erases" from the unfinished transaction and leaves my system in the same state that it would have been in had the first "yum update" not aborted.
In this case, I've actually got two transactions in the /var/lib/yum/ directory:
# ls -la /var/lib/yum/
drwxr-xr-x 2 root root 4096 Apr 6 18:47 .
drwxr-xr-x 34 root root 4096 Mar 20 16:54 ..
-rw-r--r-- 1 root root 1886 Apr 2 18:53 transaction-all.2009-04-02.18:53.18
-rw-r--r-- 1 root root 2230 Apr 6 18:42 transaction-all.2009-04-06.18:42.23
yum-complete-transaction says it is processing the most recent one (the transaction from 04-06-2009), so I'll show it's contents:
# cat /var/lib/yum/transaction-all.2009-04-06.18\:42.23
I've also captured the output of yum-complete-transaction, but it's close to 3000 lines by the time it processes all dependencies, so I'm going to just add that as an attachment rather than paste it into the ticket.
Any other information you think you might need?
Whoops...I forgot that yum-complete-transaction was provided by yum-utils, not yum itself. Here's a little more version info, just for completeness:
# rpm -q yum-utils
# yum-complete-transaction --version
yum-complete-transactions - 1.0 (yum - 3.2.19)
Can you run:
echo 'n' | yum-complete-transaction -d 7
and attach that output?
Created attachment 338744 [details]
output from "echo 'n' | yum-complete-transaction -d 7"
Closing as a dup. If we can get ACKs we can stop the worst problem (offering to erase everything).
*** This bug has been marked as a duplicate of bug 495911 ***