Friday, April 13, 2007

How to upgrade mandriva dist with urpmi

Re: [Cooker] Upgrade Notes (e.g. urpmi upgrades...)
From: Colin Guthrie
Date: Today 11:15:02 am

Angelo Naselli wrote:
> Alle 12:58, giovedì 12 aprile 2007, Rafal Prasal ha scritto:
>> try to make 2006.0 -> 2007.0 and then 2007.0 -> 2007.1 :>
>> There are many things that were changed since 2006.0 arrived.
> Yes but 2006->2007.1 should be supported anyway, so if there are problems....

Indeed. I'll bite the bullet and go for the 2 step jump!

> Ah well Col you can be the first one ;) The machines are yours :p

Done three 2007.0 -> 2007.1's so far.

It all went smoothly. I followed my usual procedure which is roughly:

   1. Find any .rpmnew files and resolve them prior to upgrade.
   2. Copy /etc/ to a safe location for sanity (probably never used)
   3. rpm -qa --nosignature | sort >
/home/rpms/upgrades/rpmlist.2007.0.$(hostname -s).txt
   4. urpmi.removemedia -a
   5. urpmi.addmedia Main-32
   6. urpmi.addmedia --update MainUpdates-32
   7. urpmi.addmedia Contrib-32
   8. urpmi.addmedia --update ContribUpdates-32
   9. urpmi --auto --no-verify-rpm urpmi 2>&1 | tee -a
/home/rpms/upgrades/urpmi.2007.0.$(hostname -s).log
          * This appears to remove your /etc/localtime (leaves an
.rpmsave meaning the machine is now in UTC mode)
  10. urpmi --auto --no-verify-rpm --auto-select 2>&1 | tee -a
/home/rpms/upgrades/urpmi.2007.0.$(hostname -s).log
  11. Do the kernel
  12. Switch to grub
  13. Reboot
  14. rpm -qa --nosignature | sort >
/home/rpms/upgrades/rpmlist.2007.1.$(hostname -s).txt
  15. Compare the packages and remove orphaned libs still installed.

There are quite a few 2007.0 packages that are still part of 2007.1. The
last step would be made a lot simpler if all packages were rebuilt with
the relevent dist suffix for each release - despite the PITA that is to
do in terms of all the bump+submits required.

During step 9 on my first u/g my /etc/localtime was removed, I replaced
it with a symlink but when timezone updated it moaned that I'd created a
symlink.... with the second u/g it was replaced automatically, so the
answer is - don't touch it ;)

Other than that everything went pretty smoothly.



|      Colin Guthrie       |
| cguthrie(at) |
|  |

No comments: