Kaydet (Commit) f959fc2a authored tarafından Suleyman Poyraz's avatar Suleyman Poyraz Kaydeden (comit) GitHub

Merge pull request #20 from Zaryob/develop

three girl in one cup
......@@ -77,8 +77,11 @@ class Check(command.Command, metaclass=command.autocommand):
elif self.args:
pkgs = self.args
else:
ctx.ui.info(_('Checking all installed packages.') + '\n')
ctx.ui.info(_('Checking all installed packages.'), color='blue')
pkgs = inary.db.installdb.InstallDB().list_installed()
if not pkgs:
ctx.ui.error(_("No package has been installed yet. :("))
exit()
necessary_permissions = True
......
......@@ -51,7 +51,7 @@ Remove all orphaned packages from the system.
self.parser.add_option_group(group)
def run(self):
self.init(database=True, write=False)
self.init()
orphaned = self.installdb.get_orphaned()
if ctx.get_option('exclude'):
orphaned = inary.blacklist.exclude(orphaned, ctx.get_option('exclude'))
......
......@@ -101,11 +101,13 @@ def calculate_free_space_needed(order):
else:
total_needed += int(packagedb.get_package(pkg.name).installedSize)
needed, symbol = util.human_readable_size(total_needed)
if total_needed < 0:
ctx.ui.info(_("After this operation, {:.2f} {} space will be freed.").format(needed, symbol), color='cyan')
ctx.ui.info(_("After this operation, {:.2f} {} space will be freed.").format(abs(int(needed)), symbol), color='cyan')
else:
ctx.ui.info(_("After this operation, {:.2f} {} space will be used.").format(needed, symbol), color='cyan')
ctx.ui.info(_("After this operation, {:.2f} {} space will be used.").format(abs(int(needed)), symbol), color='cyan')
return total_needed
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment