* pisi check'in ne yaptığı belli olsun.
This commit is contained in:
+3
-3
@@ -313,12 +313,12 @@ def check(package):
|
|||||||
for file in files.list:
|
for file in files.list:
|
||||||
if file.hash and file.type != "config" \
|
if file.hash and file.type != "config" \
|
||||||
and not os.path.islink('/' + file.path):
|
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):
|
if file.hash != util.sha1_file('/' + file.path):
|
||||||
corrupt.append(file)
|
corrupt.append(file)
|
||||||
ctx.ui.info("Corrupt file: %s" % file)
|
ctx.ui.info(_("\nCorrupt file: %s") % file, noln=True)
|
||||||
else:
|
else:
|
||||||
ctx.ui.info("OK", verbose=True)
|
ctx.ui.info(_("OK"), verbose=True)
|
||||||
return corrupt
|
return corrupt
|
||||||
|
|
||||||
def index(dirs=None, output='pisi-index.xml', skip_sources=False, skip_signing=False,
|
def index(dirs=None, output='pisi-index.xml', skip_sources=False, skip_signing=False,
|
||||||
|
|||||||
@@ -821,10 +821,13 @@ If no packages are given, checks all installed packages.
|
|||||||
ctx.ui.info(_('Checking all installed packages'))
|
ctx.ui.info(_('Checking all installed packages'))
|
||||||
pkgs = ctx.installdb.list_installed()
|
pkgs = ctx.installdb.list_installed()
|
||||||
for pkg in pkgs:
|
for pkg in pkgs:
|
||||||
|
ctx.ui.info(_('* Checking %s... ') % pkg, noln=True)
|
||||||
if ctx.installdb.is_installed(pkg):
|
if ctx.installdb.is_installed(pkg):
|
||||||
corrupt = pisi.api.check(pkg)
|
corrupt = pisi.api.check(pkg)
|
||||||
if corrupt:
|
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:
|
else:
|
||||||
ctx.ui.info(_('Package %s not installed') % pkg)
|
ctx.ui.info(_('Package %s not installed') % pkg)
|
||||||
self.finalize()
|
self.finalize()
|
||||||
|
|||||||
Reference in New Issue
Block a user