LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-04-2013, 03:25 AM   #1
RSpendl
LQ Newbie
 
Registered: Oct 2005
Location: Slovenia
Posts: 11

Rep: Reputation: 0
Finishing an interrupted "yum upgrade"


Being a brilliant mind and as all brilliant minds sometimes make small mistakes, I have thought of making a "yum upgrade" while browsing through the morning news and having a coffee. "A small mistake" was doing an upgrade few months due (i.e. going through hundreds of transactions) through a terminal session at my laptop with a failing battery (which is otherwise an excellent device that limits the "browsing news while having a coffee" time and makes you sit at your desk and do some paid work).

Anyway, when the inevitable shutdown happend just a few seconds before I connected the charger (and the upgrade process at the main computer was interrupted), the recovery had to be done. As I have previously encoutered broken upgrades with yum, I had no hopes for "yum-complete-transactions" to work (though I have tried it in vain, "hope dies last"). There are too many duplicate versions of the packages and specifically the interrupt of course happens just when a multilib package has installed the new x86_64 version of the package but not the i686 version (or whatever can break the upgrade flow).

The mess I have made was cleaned as follows:

1. Find the duplicate packages with "yum check". As I've had almost 300 duplicates, manually deleting the duplicates (with "rpm -e") was not something I'd really like to do (and clients waiting for the projects would not be too apreciative, either).

2. Realizing that the output of the "yum check" actually is a table with 6 columns, e.g.
"PyQt4-4.10.1-4.fc17.x86_64 is a duplicate with PyQt4-4.10-1.fc17.x86_64", awk can help.

3. rpm is not happy processing stdin (I have read that the paranoic anaconda is the reason), but is quite happy to process a bash variable.

So, this is what I have done:
yum check >yumcheck
mylist=`awk '{print $6}' yumcheck; rpm -ev $mylist

So I have manually removed old versions of the packages - I guess removing the new version (with $1 instead of $6) would work too.

(I guess I could do without the temporary file like:
yum check | mylist=`awk '{print $6}' -; rpm -ev $mylist

but I haven't tested it as my yum database is clean now :-)

When running "yum upgrade" again there was another problem with the abovementioned multilib and I have had to run two "rpm -e" commands to clean the stuff, but this was peanuts compared to 277 duplicated before. When yum reports problem with multilib, I ran the rpm command to find the problem, it happened to be glibc (that's what yum reported):

rpm -q glibc

produced
glibc-2.15-58.fc17.x86_64
glibc-2.15-58.fc17.i686
glibc-2.15-59.fc17.x86_64

I have removed the "new" version (the old ones had many dependent packages) and ran the "yum upgrade" again.

rpm -e glibc-2.15-59.fc17.x86_64
yum upgrade

There might be more than one unfinished multilib packages, just remove the partially installed new packages and eventually the "yum upgrade" will work.

Hopefully this helps some other "brilliant minds" and also some of the normal people who just happened to experience a "non-anthropogenic" interrupt during the critical upgrade phase.
 
Old 07-04-2013, 02:33 PM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,623

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
so you did not use the recommended "FedUp " to move fedora 17 to 18
( fedora 19 is now the current release)

doing a "live" upgrade on a running machine has VERY VERY VERY big risks !!!
-- so much so that preparing for the "worst case" is the norm )
if it is interrupted for any reason , the system might NEVER reboot again
so as a normal precaution you did make a FULL system back up ( cloned the operating system)

reinstall from the clone you made as a precaution


if you did not
this might be unfixable
-- or in your case mostly fixable

as a side note i used fedora for years and years , and NEVER had "preupgrade" work as intended
i always had to do a new clean install
 
Old 07-14-2013, 03:10 AM   #3
RSpendl
LQ Newbie
 
Registered: Oct 2005
Location: Slovenia
Posts: 11

Original Poster
Rep: Reputation: 0
Sorry I was not clear: I was not upgrading from FC17 to FC18 (or 19), just did a regular "yum update" (ok, it was "upgrade", but never mind) as I used to have troubles with automatic updates hogging my computer and prefer doing more or less regular yum updates manually. Upgrading the FC version is of course something even I wouldn't do on running laptop with failing battery :-)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"Not sufficient disk space, downloaded file interrupted" error, PL 421 (frugal)... Benny7440 Linux - Newbie 2 11-28-2009 09:11 PM
yum upgrade interrupted longears Linux - Server 2 08-14-2008 10:21 AM
Difference betweenn "yum install" and "yum update" john lee Linux - Newbie 1 02-11-2008 11:26 PM
Yum Upgrade from FC5 "Floating point exception" TheJosh Fedora 0 01-05-2007 10:03 PM
"yum -y upgrade" FC4->FC5 killed my machine! U4ea Fedora 1 04-20-2006 10:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration