* pisi check'in ne yaptığı belli olsun.

This commit is contained in:
Faik Uygur
2006-09-19 13:42:33 +00:00
parent 86a659a621
commit 43e42108ff
2 changed files with 7 additions and 4 deletions
+3 -3
View File
@@ -313,12 +313,12 @@ def check(package):
for file in files.list:
if file.hash and file.type != "config" \
and not os.path.islink('/' + file.path):
ctx.ui.info(_("Checking %s ") % file.path, noln=True, verbose=True)
ctx.ui.info(_("Checking /%s ") % file.path, noln=True, verbose=True)
if file.hash != util.sha1_file('/' + file.path):
corrupt.append(file)
ctx.ui.info("Corrupt file: %s" % file)
ctx.ui.info(_("\nCorrupt file: %s") % file, noln=True)
else:
ctx.ui.info("OK", verbose=True)
ctx.ui.info(_("OK"), verbose=True)
return corrupt
def index(dirs=None, output='pisi-index.xml', skip_sources=False, skip_signing=False,
+4 -1
View File
@@ -821,10 +821,13 @@ If no packages are given, checks all installed packages.
ctx.ui.info(_('Checking all installed packages'))
pkgs = ctx.installdb.list_installed()
for pkg in pkgs:
ctx.ui.info(_('* Checking %s... ') % pkg, noln=True)
if ctx.installdb.is_installed(pkg):
corrupt = pisi.api.check(pkg)
if corrupt:
ctx.ui.info(_('Package %s is corrupt.') % pkg)
ctx.ui.info(_('\nPackage %s is corrupt.') % pkg)
else:
ctx.ui.info(_("OK"), verbose=False)
else:
ctx.ui.info(_('Package %s not installed') % pkg)
self.finalize()