Ressources documentaires pour Mandriva Linux et les Logiciels Libres

Upgrading from Mandriva 2010.1 to Mandriva 2011 TP/Cooker

With the migration of Mandriva from rpm 4.6 to rpm 5.x, upgrading from a previous Mandriva release is not straightforward. So here are some tips to have a smooth upgrade :

  1. Install the perl-URPM 3.37 package available in main/testing repository ( 32 bits link, 64 bits link )
  2. remove all your current media : urpmi.removemedia -a
  3. add cooker media : urpmi.addmedia --distrib --mirrorlist 'http://api.mandriva.com/mirrors/basic.cooker.$ARCH.list'
  4. upgrade your Mandriva installation : urpmi --auto-update

If you have issues and error message like Unable to open /usr/lib/rpm/rpmrc for reading then it means that perl-URPM have not been updated and the rpm database conversion is not complete. Indeed part of the conversion of the rpm database is handled by perl-URPM, so if the new version is not installed, then your database end up not being completly converted. So to do this, you will have to download the latest perl-URPM version in cooker repository, extract its content with rpm2cpio, and then initiate the conversion :

  1. download the perl-URPM 4 and urpmi packages in cooker main/release repository in /tmp/rpm5
  2. as root, go the previous directory : cd /tmp/rpm5
  3. extract perl-URPM content with rpm2cpio in the current /tmp/rpm5 directory : rpm2cpio perl-URPM-4*.rpm | cpio -idmv
  4. extract urpmi package content with rpm2cpio in the current /rpm/rpm5 directory : rpm2cpio urpmi*.rpm | cpio -idmv
  5. in the /tmp/rpm5 initiate the rpm database conversion : perl -I. -Murpm -e 'URPM::DB::convert("/", "btree", 1, 1)'
  6. now install the urpmi and perl-URPM package : rpm -Uvh *.rpm
  7. You can finish to upgrade your system : urpmi --auto-update

Normally you system should be updated to the latest cooker release. Happy testing !!! 🙂

Similar posts

8 Commentaires

  1. 04/02/2011    

    Does this also work for coming from 2010.2?

    • darkmind's Gravatar darkmind
      05/02/2011    

      yes. 2010.2 is just 2010.1 + security/bugfixes updates that you can find in main/updates and contrib/updates 🙂

  2. 05/02/2011    

    Thank you for this tutorial. Some commands you give don’t work using copy/paste in the console

    unfortunately, the last one never pass regardless of the syntax :

    [root@localhost ~]# cd /tmp/rpm5/
    [root@localhost rpm5]#
    [root@localhost rpm5]# rpm2cpio perl-URPM-4*.rpm | cpio -idmv
    ./usr/lib/perl5/vendor_perl/5.12.2/i386-linux-thread-multi/URPM
    ./usr/lib/perl5/vendor_perl/5.12.2/i386-linux-thread-multi/URPM.pm
    ./usr/lib/perl5/vendor_perl/5.12.2/i386-linux-thread-multi/URPM/Build.pm
    ./usr/lib/perl5/vendor_perl/5.12.2/i386-linux-thread-multi/URPM/Query.pm
    ./usr/lib/perl5/vendor_perl/5.12.2/i386-linux-thread-multi/URPM/Resolve.pm
    ./usr/lib/perl5/vendor_perl/5.12.2/i386-linux-thread-multi/URPM/Signature.pm
    ./usr/lib/perl5/vendor_perl/5.12.2/i386-linux-thread-multi/auto/URPM
    ./usr/lib/perl5/vendor_perl/5.12.2/i386-linux-thread-multi/auto/URPM/URPM.so
    ./usr/share/doc/perl-URPM
    ./usr/share/doc/perl-URPM/ChangeLog
    ./usr/share/doc/perl-URPM/README
    ./usr/share/man/man3/URPM.3pm.xz
    1008 blocs
    [root@localhost rpm5]# perl -I. -Murpm -e ‘URPM::DB::convert(“/”, “btree”, 1, 1)’
    Unrecognized character \xE2 in column 19 at -e line 1.
    [root@localhost rpm5]# rpm2cpio perl-URPM-4*.rpm | cpio -idmv^C
    [root@localhost rpm5]# perl -I. -Murpm -e ‘URPM::DB::convert(“/”, “btree”, 1, 1)’
    -bash: Erreur de syntaxe près du symbole inattendu « ( »
    [root@localhost rpm5]# perl -I. -Murpm -e ‘URPM::DB::convert(« / », « btree », 1, 1)’
    -bash: Erreur de syntaxe près du symbole inattendu « ( »
    [root@localhost rpm5]# perl -I. -Murpm -e ‘URPM::DB::convert(« / », « btree », 1, 1)’
    -bash: Erreur de syntaxe près du symbole inattendu « ( »
    [root@localhost rpm5]# perl -I. -Murpm -e ‘URPM::DB::convert(« / », « btree », 1, 1)’
    Undefined subroutine &URPM::DB::convert called at -e line 1.
    [root@localhost rpm5]#

    What’s wrong ?

    • darkmind's Gravatar darkmind
      05/02/2011    

      strange, especially concerning the caracter error.
      2 possibilities :
      1. issues with the caracter when doing a copy/paste. Be sure to use accordingly the ‘ ( under the 4 key ) and  » ( under the 3 key ) by replacing them manuelly

      2. if the former doesn’t work, then try this :
      cd /
      rpm2cpio /tmp/rpm5/perl-URPM* | cpio -idmv
      perl -Murpm -e ‘URPM::DB::convert(« / », « btree », 1, 1)’

  3. 06/02/2011    

    For the bad caracters, it’s Ok

    For the second point see here : http://pastebin.com/dh3LvzUe

  4. Kit's Gravatar Kit
    10/04/2013    

    Hey just wanted to give you a quick heads up. The text in your article seem
    to be running off the screen in Ie. I’m not sure if this is a formatting issue or something to do with web browser compatibility but I thought I’d
    post to let you know. The layout look great though! Hope you get the issue fixed
    soon. Thanks

Répondre à sylvainsjc Annuler la réponse.

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Catégories

My Tweets