#1 Le 11/07/2010, à 14:11
- Maisondouf
[rés]Repérer les fichiers '.list' manquant dans /var/lib/dpkg/info
Suite à un petit soucis de mise à jour, j'ai maintenant des fichiers 'xxx.list' qui manque.
Apt-get m'en sort uns liste très longue et en fait trop longue pour mon terminal....
Est ce que quelqu'un a déjà fait un scripte qui sort la liste des fichiers '.list' manquant pour les paquets déjà installés?
Je me mélange entre dpkg, dpkg-query et apt-get, mais déja je n'arrive pas à sortir une liste des paquets installés...
Dernière modification par Maisondouf (Le 11/07/2010, à 16:37)
ASUS M5A88-v EVO avec AMD FX(tm)-8120 Eight-Core Processor, OS principal Precise 12.04.1 LTS 63bits½
Bricoleur, menteur, inculte, inadapté social et mythomane, enfin d'après certains....
"the secret of my form is summed up in two words, no sport" (Winston Churchill)
Hors ligne
#2 Le 11/07/2010, à 14:18
- Maisondouf
Re : [rés]Repérer les fichiers '.list' manquant dans /var/lib/dpkg/info
'sudo dpkg --get-selections' liste les paquets mais il y en a en 'install' et d'autre en 'deinstall'.
C'est quoi la différence ?
ASUS M5A88-v EVO avec AMD FX(tm)-8120 Eight-Core Processor, OS principal Precise 12.04.1 LTS 63bits½
Bricoleur, menteur, inculte, inadapté social et mythomane, enfin d'après certains....
"the secret of my form is summed up in two words, no sport" (Winston Churchill)
Hors ligne
#3 Le 11/07/2010, à 14:58
- Maisondouf
Re : [rés]Repérer les fichiers '.list' manquant dans /var/lib/dpkg/info
Ça marche...
#! /bin/sh
dpkg --get-selections >select
cat select | grep -v deinstall | cut -f 1 >installed
while read lefile
do
if [ ! -r /var/lib/dpkg/info/$lefile.list ]; then
echo "$lefile.list missing"
fi
done < installed
ASUS M5A88-v EVO avec AMD FX(tm)-8120 Eight-Core Processor, OS principal Precise 12.04.1 LTS 63bits½
Bricoleur, menteur, inculte, inadapté social et mythomane, enfin d'après certains....
"the secret of my form is summed up in two words, no sport" (Winston Churchill)
Hors ligne