yum et le plugin yum-skip-broken

Guillaume Kulakowski par Guillaume Kulakowski dans Linux 28 février 2007 5
yum

De plus en plus yum subit les critiques :

Je suis pas d’accord avec cette vision, je pense que yum et l’un des gestionnaires de paquet les plus puissants. Il gère le multi-architecture (x86 sur du x86-64), ce qu’apt-get ne fait pas encore. Mais surtout, les fonctionnalités qui lui manquent peuvent être rajoutées via des plugins. Et c’est justement de plugin que je vais parler dans ce billet, le plugin yum-skip-broken.

Prenons l’exemple d’une mise à jour via yum qui ne peut satisfaire toute les dépendances :

root@enterprise ~> yum update
Setting up Update Process
Setting up repositories
Loading mirror speeds from cached hostfile
Reading repository metadata in from local files
Resolving Dependencies

  for hdr in conduit.getRpmDB().getHdrList():
--> Populating transaction set with selected packages. Please wait.
---> Package crontabs.noarch 0:1.10-12.fc6 set to be updated
---> Package bind-utils.i386 31:9.3.4-3.fc6 set to be updated
---> Package nss-tools.i386 0:3.11.5-0.6.0.fc6 set to be updated
---> Package nspr.i386 0:4.6.5-0.6.0.fc6 set to be updated
---> Package gnome-python2-libegg.i386 0:2.14.2-9.fc6 set to be updated
---> Package yelp.i386 0:2.16.0-12.fc6 set to be updated
---> Package vixie-cron.i386 4:4.1-68.fc6 set to be updated
---> Package gnome-python2-gtkhtml2.i386 0:2.14.2-9.fc6 set to be updated
---> Package epiphany.i386 0:2.16.3-2.fc6 set to be updated
---> Package tzdata.noarch 0:2007c-1.fc6 set to be updated
---> Package audit-libs-python.i386 0:1.4.2-2.fc6 set to be updated
---> Package audit-libs.i386 0:1.4.2-2.fc6 set to be updated
---> Package gnome-python2-extras.i386 0:2.14.2-9.fc6 set to be updated
---> Package xorg-x11-server-Xorg.i386 0:1.1.1-47.6.fc6 set to be updated
---> Downloading header for firefox to pack into transaction set.
ftp://ftp.redhat.ikoula.com/fedora/updates/6/i386/firefox-1.5.0.10-1.fc6.i386.rpm: [Errno 4] IOError: [Errno ftp error] 
Trying other mirror.
http://ftp.crihan.fr/mirrors/fedora.redhat.com/fedora/linux/core/updates/6/i386/firefox-1.5.0.10-1.fc6.i386.rpm: [Errno 14] HTTP Error 404: Date: Wed, 28 Feb 2007 08:57:41 GMT
Server: Apache/2.0.55 (Unix) DAV/2 PHP/4.3.8
Content-Length: 381
Content-Type: text/html; charset=iso-8859-1

Trying other mirror.
firefox-1.5.0.10-1.fc6.i3 100% |=========================|  90 kB    00:00     
---> Package firefox.i386 0:1.5.0.10-1.fc6 set to be updated
---> Package nss.i386 0:3.11.5-0.6.0.fc6 set to be updated
---> Package bind-libs.i386 31:9.3.4-3.fc6 set to be updated
--> Running transaction check
--> Processing Dependency: firefox = 1.5.0.9 for package: liferea
--> Finished Dependency Resolution
Error: Missing Dependency: firefox = 1.5.0.9 is needed by package liferea

Deux solution s’offrent à nous :

  • La première étant de jouer avec le flag --exclude
  • La seconde consistant à utiliser le plugin yum-skip-broken.

Installation du plugin :

root@enterprise ~> yum install yum-skip-broken

Mise à jour en utilisant le plugin :

root@enterprise ~> yum update --skip-broken
Loading "skip-broken" plugin
Setting up Update Process
Setting up repositories
Loading mirror speeds from cached hostfile
Reading repository metadata in from local files
Resolving Dependencies

  for hdr in conduit.getRpmDB().getHdrList():
Checking packages for dependency problems
--> Populating transaction set with selected packages. Please wait.
---> Package crontabs.noarch 0:1.10-12.fc6 set to be updated
--> Running transaction check
--> Populating transaction set with selected packages. Please wait.
---> Package bind-utils.i386 31:9.3.4-3.fc6 set to be updated
--> Running transaction check
--> Processing Dependency: bind-libs = 31:9.3.4-3.fc6 for package: bind-utils
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package bind-libs.i386 31:9.3.4-3.fc6 set to be updated
--> Running transaction check
--> Populating transaction set with selected packages. Please wait.
---> Package nss-tools.i386 0:3.11.5-0.6.0.fc6 set to be updated
--> Running transaction check
--> Processing Dependency: nss = 3.11.5-0.6.0.fc6 for package: nss-tools
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package nss.i386 0:3.11.5-0.6.0.fc6 set to be updated
--> Running transaction check
--> Populating transaction set with selected packages. Please wait.
---> Package nspr.i386 0:4.6.5-0.6.0.fc6 set to be updated
--> Running transaction check
--> Populating transaction set with selected packages. Please wait.
---> Package gnome-python2-libegg.i386 0:2.14.2-9.fc6 set to be updated
--> Running transaction check
--> Processing Dependency: gnome-python2-extras = 2.14.2-9.fc6 for package: gnome-python2-libegg
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package gnome-python2-extras.i386 0:2.14.2-9.fc6 set to be updated
--> Running transaction check
--> Processing Dependency: gnome-python2-extras = 2.14.2-8.fc6 for package: gnome-python2-gtkhtml2
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package gnome-python2-gtkhtml2.i386 0:2.14.2-9.fc6 set to be updated
--> Running transaction check
--> Populating transaction set with selected packages. Please wait.
---> Package yelp.i386 0:2.16.0-12.fc6 set to be updated
--> Running transaction check
--> Processing Dependency: gecko-libs = 1.8.0.10 for package: yelp
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package firefox.i386 0:1.5.0.10-1.fc6 set to be updated
--> Running transaction check
--> Processing Dependency: firefox = 1.5.0.9 for package: liferea
--> Processing Dependency: gecko-libs = 1.8.0.9 for package: epiphany
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package epiphany.i386 0:2.16.3-2.fc6 set to be updated
--> Running transaction check
--> Processing Dependency: firefox = 1.5.0.9 for package: liferea
--> Finished Dependency Resolution
--> Populating transaction set with selected packages. Please wait.
---> Package vixie-cron.i386 4:4.1-68.fc6 set to be updated
--> Running transaction check
--> Populating transaction set with selected packages. Please wait.
---> Package gnome-python2-gtkhtml2.i386 0:2.14.2-9.fc6 set to be updated
--> Running transaction check
--> Processing Dependency: gnome-python2-extras = 2.14.2-9.fc6 for package: gnome-python2-gtkhtml2
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package gnome-python2-extras.i386 0:2.14.2-9.fc6 set to be updated
--> Running transaction check
--> Processing Dependency: gnome-python2-extras = 2.14.2-8.fc6 for package: gnome-python2-libegg
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package gnome-python2-libegg.i386 0:2.14.2-9.fc6 set to be updated
--> Running transaction check
--> Populating transaction set with selected packages. Please wait.
---> Package epiphany.i386 0:2.16.3-2.fc6 set to be updated
--> Running transaction check
--> Processing Dependency: gecko-libs = 1.8.0.10 for package: epiphany
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package firefox.i386 0:1.5.0.10-1.fc6 set to be updated
--> Running transaction check
--> Processing Dependency: gecko-libs = 1.8.0.9 for package: yelp
--> Processing Dependency: firefox = 1.5.0.9 for package: liferea
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package yelp.i386 0:2.16.0-12.fc6 set to be updated
--> Running transaction check
--> Processing Dependency: firefox = 1.5.0.9 for package: liferea
--> Finished Dependency Resolution
--> Populating transaction set with selected packages. Please wait.
---> Package tzdata.noarch 0:2007c-1.fc6 set to be updated
--> Running transaction check
--> Populating transaction set with selected packages. Please wait.
---> Package audit-libs-python.i386 0:1.4.2-2.fc6 set to be updated
--> Running transaction check
--> Processing Dependency: audit-libs = 1.4.2-2.fc6 for package: audit-libs-python
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package audit-libs.i386 0:1.4.2-2.fc6 set to be updated
--> Running transaction check
--> Populating transaction set with selected packages. Please wait.
---> Package audit-libs.i386 0:1.4.2-2.fc6 set to be updated
--> Running transaction check
--> Processing Dependency: audit-libs = 1.4.1-1.fc6 for package: audit-libs-python
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package audit-libs-python.i386 0:1.4.2-2.fc6 set to be updated
--> Running transaction check
--> Populating transaction set with selected packages. Please wait.
---> Package gnome-python2-extras.i386 0:2.14.2-9.fc6 set to be updated
--> Running transaction check
--> Processing Dependency: gnome-python2-extras = 2.14.2-8.fc6 for package: gnome-python2-gtkhtml2
--> Processing Dependency: gnome-python2-extras = 2.14.2-8.fc6 for package: gnome-python2-libegg
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package gnome-python2-gtkhtml2.i386 0:2.14.2-9.fc6 set to be updated
---> Package gnome-python2-libegg.i386 0:2.14.2-9.fc6 set to be updated
--> Running transaction check
--> Populating transaction set with selected packages. Please wait.
---> Package xorg-x11-server-Xorg.i386 0:1.1.1-47.6.fc6 set to be updated
--> Running transaction check
--> Populating transaction set with selected packages. Please wait.
---> Package firefox.i386 0:1.5.0.10-1.fc6 set to be updated
--> Running transaction check
--> Processing Dependency: gecko-libs = 1.8.0.9 for package: yelp
--> Processing Dependency: firefox = 1.5.0.9 for package: liferea
--> Processing Dependency: gecko-libs = 1.8.0.9 for package: epiphany
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package epiphany.i386 0:2.16.3-2.fc6 set to be updated
---> Package yelp.i386 0:2.16.0-12.fc6 set to be updated
--> Running transaction check
--> Processing Dependency: firefox = 1.5.0.9 for package: liferea
--> Finished Dependency Resolution
--> Populating transaction set with selected packages. Please wait.
---> Package nss.i386 0:3.11.5-0.6.0.fc6 set to be updated
--> Running transaction check
--> Processing Dependency: nss = 3.11.4-0.6.fc6 for package: nss-tools
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package nss-tools.i386 0:3.11.5-0.6.0.fc6 set to be updated
--> Running transaction check
--> Populating transaction set with selected packages. Please wait.
---> Package bind-libs.i386 31:9.3.4-3.fc6 set to be updated
--> Running transaction check
--> Processing Dependency: bind-libs = 31:9.3.4-2.fc6 for package: bind-utils
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package bind-utils.i386 31:9.3.4-3.fc6 set to be updated
--> Running transaction check
yelp - 2.16.0-12.fc6.i386 failed dependency resolving 
Missing Dependency: firefox = 1.5.0.9 is needed by package liferea 
epiphany - 2.16.3-2.fc6.i386 failed dependency resolving 
Missing Dependency: firefox = 1.5.0.9 is needed by package liferea 
firefox - 1.5.0.10-1.fc6.i386 failed dependency resolving 
Missing Dependency: firefox = 1.5.0.9 is needed by package liferea 
End Checking packages for dependency problems
--> Populating transaction set with selected packages. Please wait.
---> Package crontabs.noarch 0:1.10-12.fc6 set to be updated
---> Package bind-utils.i386 31:9.3.4-3.fc6 set to be updated
---> Package nss-tools.i386 0:3.11.5-0.6.0.fc6 set to be updated
---> Package nspr.i386 0:4.6.5-0.6.0.fc6 set to be updated
---> Package gnome-python2-libegg.i386 0:2.14.2-9.fc6 set to be updated
---> Package vixie-cron.i386 4:4.1-68.fc6 set to be updated
---> Package gnome-python2-gtkhtml2.i386 0:2.14.2-9.fc6 set to be updated
---> Package tzdata.noarch 0:2007c-1.fc6 set to be updated
---> Package audit-libs-python.i386 0:1.4.2-2.fc6 set to be updated
---> Package audit-libs.i386 0:1.4.2-2.fc6 set to be updated
---> Package gnome-python2-extras.i386 0:2.14.2-9.fc6 set to be updated
---> Package xorg-x11-server-Xorg.i386 0:1.1.1-47.6.fc6 set to be updated
---> Package nss.i386 0:3.11.5-0.6.0.fc6 set to be updated
---> Package bind-libs.i386 31:9.3.4-3.fc6 set to be updated
--> Running transaction check

Dependencies Resolved

=============================================================================
 Package                 Arch       Version          Repository        Size 
=============================================================================
Updating:
 audit-libs              i386       1.4.2-2.fc6      updates            57 k
 audit-libs-python       i386       1.4.2-2.fc6      updates            73 k
 bind-libs               i386       31:9.3.4-3.fc6   updates           836 k
 bind-utils              i386       31:9.3.4-3.fc6   updates           162 k
 crontabs                noarch     1.10-12.fc6      updates           6.2 k
 gnome-python2-extras    i386       2.14.2-9.fc6     updates            24 k
 gnome-python2-gtkhtml2  i386       2.14.2-9.fc6     updates            15 k
 gnome-python2-libegg    i386       2.14.2-9.fc6     updates            53 k
 nspr                    i386       4.6.5-0.6.0.fc6  updates           118 k
 nss                     i386       3.11.5-0.6.0.fc6  updates           764 k
 nss-tools               i386       3.11.5-0.6.0.fc6  updates           1.8 M
 tzdata                  noarch     2007c-1.fc6      updates           753 k
 vixie-cron              i386       4:4.1-68.fc6     updates            91 k
 xorg-x11-server-Xorg    i386       1.1.1-47.6.fc6   updates           3.2 M

Transaction Summary
=============================================================================
Install      0 Package(s)         
Update      14 Package(s)         
Remove       0 Package(s)         

Total download size: 7.9 M
Is this ok [y/N]: 

C’est pas plus dur que ça et cela évite d’utiliser --exclude, de faire un essai, de rajouter un autre paquet dans la liste des paquets exclus, refaire un essai, etc…

Commentaires

bbTGV

Je ne veux pas remettre en cause Yum je le trouve très bien ...
Mais je me met à côté d'un utilisateur qui débute il n'est pas simple.
Tu vas me dire qu'il existe l'interface graphique.
Et oui mais la dernière fois que je l'ai utilisé elle plantait.
Bref j'essayerais tes plugg et je te dirais quoi.

brice

Le lien cassé vers l'article qui explique la lenteur de yum c'est fait exprès? ^^

LLaumgui

Corrigé, merci ;-)

Kevin Kofler

Bah, personellement, j'utilise toujours apt-rpm (ou plutôt "à nouveau", j'avais utilisé yum pour un certain temps entre l'arrêt des repositories apt-rpm classiques et l'ajout du support repomd à apt-rpm), il gère les repositories repomd (yum) maintenant (même si ça rame à peu près autant que yum, le vieux format était beaucoup plus rapide à parser), et les multilibs 64-bits aussi, et on n'a pas besoin de hacks comme yum-skip-broken, apt-rpm fait ça d'office.

bbTGV

C'est bon à savoir.

Les commentaires pour ce poste sont fermés.

Réseaux sociaux