Re: [CentOS] Broken upgrade to 5.2 {solved - I hope}

2008-06-25 Thread Ian Blackwell
Thanks to all that offered advice to help solve this for me.  Here's a 
round up for those that may follow in similarly ill-fated foot-steps.


1. Don't update/upgrade remotely without using screen.  Dropping the 
ssh session caused yum to die inelegantly, with duplicate packages in 
the RPM database.

2. Analysing the output from
   /bin/rpm -qa --qf '%{name}-%{version}-%{release}.%{arch}.rpm\n' | sort
led me to erase almost 30 new packages that appeared to be duplicates of 
existing packages.  This wasn't without problems though, because I used 
this command:-

   yum erase libgcc-4.1.2-42.el5.i386
to remove the duplication noticed here:-
   libgcc-4.1.2-14.el5.i386.rpm
   libgcc-4.1.2-42.el5.i386.rpm
3. This broke the machine badly, and caused yum to stop working 
completely with missing libgcc_s.so.1 being reported as the cause.  This 
also effected other programs, e.g. man wasn't working either.  Anyway, 
long story short, I booted from the 5.1 DVD in rescue mode.  I was 
reluctant to reboot the box in a half upgraded state, but was forced 
into this due to the corrupt libgcc problem.  I then forced the 
reinstallation of libgcc-4.1.2-14.el5.i386 from the DVD using:-

   rpm -ivh --force --root /mnt/sysimage libgcc-4.1.2-14.el5.i386.rpm
This worked OK and the machine rebooted without a problem (what a relief).
4. Next I tried the yum -y upgrade process again (from the console this 
time), and to my enormous delight, it downloaded the packages I had 
removed earlier and then passed all transaction tests and started to 
process the 577 steps left to upgrade to 5.2.
5. I think there may still be some duplicates, which I'll check for 
after the upgrade has completed.  I didn't get all the way through my 
analysis of the duplicate package list because of the broken libgcc 
issue.  Having resolved this with the rescue boot, I took a punt on 
having done enough and restarted yum upgrade.  Since it worked, I 
decided against interrupting it with the view to a subsequent 
reconciliation.


All being well, I should have an upgraded machine fairly soon.

Thanks again for your prompt and enlightened assistance 8-)

Ian
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Broken upgrade to 5.2 {solved - I hope}

2008-06-25 Thread Tim Verhoeven
On Wed, Jun 25, 2008 at 2:27 PM, Ian Blackwell [EMAIL PROTECTED] wrote:
 Thanks to all that offered advice to help solve this for me.  Here's a round
 up for those that may follow in similarly ill-fated foot-steps.

 1. Don't update/upgrade remotely without using screen.  Dropping the ssh
 session caused yum to die inelegantly, with duplicate packages in the RPM
 database.
 2. Analysing the output from
   /bin/rpm -qa --qf '%{name}-%{version}-%{release}.%{arch}.rpm\n' | sort
 led me to erase almost 30 new packages that appeared to be duplicates of
 existing packages.  This wasn't without problems though, because I used this
 command:-
   yum erase libgcc-4.1.2-42.el5.i386
 to remove the duplication noticed here:-
   libgcc-4.1.2-14.el5.i386.rpm
   libgcc-4.1.2-42.el5.i386.rpm
...snip...

The best way to remove duplicate package is using rpm itself and the
--justdb switch. This will only remote entries inside the RPM database
and not on the filesytem itself. If you remove the newest version of
the duplicate packages you can run the yum update again and it will
reinstall the newer versions and all should be good.

Regards,
Tim

-- 
Tim Verhoeven - [EMAIL PROTECTED] - 0479 / 88 11 83

Hoping the problem magically goes away by ignoring it is the
microsoft approach to programming and should never be allowed.
(Linus Torvalds)
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Broken upgrade to 5.2 {solved - I hope}

2008-06-25 Thread Karanbir Singh

Tim Verhoeven wrote:

The best way to remove duplicate package is using rpm itself and the
--justdb switch. This will only remote entries inside the RPM database
and not on the filesytem itself. If you remove the newest version of
the duplicate packages you can run the yum update again and it will
reinstall the newer versions and all should be good.



might also want to look at the package-cleanup script included in 
yum-utils


- KB
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos