|
Hi, I've write a Python script (CheckPkgs.py) to check the presence of the files against the file list in each installed packages. Note that it only checks if the file is there, not it's md5sum (and that's why it's very fast), but it's a beginning. It writes out a log file (Missing_files.log) with all missing files according to package file list, along with the package name. You must take in account that some packages, like nvidia erases some files after the installation, so the files don't match the package file list. You'll need the python package. Just make the script executable (chmod +x CheckPkgs.py) and run it. It's not very elaborated, but I have no much time to invest in it anyway. Maybe it could be of any value to anyone. Armando Jason Chu wrote: On Tue, Mar 15, 2005 at 02:35:29PM -0500, Don Bostrom wrote:Thanks for the info, now I know why I got that message. |
#! /usr/bin/python
# coding: latin-1
import os, sys
TamCons = 80
LogName = 'Missing_files.log'
def PrintInLine(obj, Tam=TamCons):
""" Imprime sem mudan�a de linha.
TamCons � o tamanho do console (padr�o 80) em colunas.
"""
ValStr = str(obj)
sys.stdout.write(ValStr + (Tam - 2 - len(ValStr)) * ' ' + '\r')
sys.stdout.flush()
if __name__ == '__main__':
FErro = file(LogName, 'w')
Pacotes = os.popen('pacman -Qi').read().split('\n')
Pacotes.sort()
try:
for Pacote in Pacotes:
if Pacote:
PrintInLine('..checking package %s' % Pacote)
Arquivos = os.popen('pacman -Ql %s' %
Pacote.split()[0]).read().split('\n')
for Arquivo in Arquivos:
if Arquivo:
Arq =
Arquivo[Arquivo.find('/'):]
if (not os.path.isfile(Arq))
and (not os.path.isdir(Arq)) and (not os.path.islink(Arq)):
FErro.write('### %-30s:
%s\n' % (Pacote, Arq))
finally:
FErro.close()
PrintInLine('\n')
raw_input('Done.')
_______________________________________________ arch mailing list [email protected] http://www.archlinux.org/mailman/listinfo/arch
