From 84145579f5da2389fb645293a49eebab79b47c78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20=C3=96zkural?= Date: Thu, 8 Dec 2005 13:05:23 +0000 Subject: [PATCH] * option to show only uninstalled packages --- pisi/cli/commands.py | 18 +++++++++++------- pisi/context.py | 2 ++ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/pisi/cli/commands.py b/pisi/cli/commands.py index 30335c4d..4e66ff46 100644 --- a/pisi/cli/commands.py +++ b/pisi/cli/commands.py @@ -589,7 +589,7 @@ source and binary packages. if len(self.args)>0: index(self.args, ctx.get_option('output')) elif len(self.args)==0: - ctx.ui.info( _('Indexing current directory.')) + ctx.ui.info(_('Indexing current directory.')) index('.', ctx.get_option('output')) self.finalize() @@ -610,9 +610,9 @@ Usage: list-installed def options(self): self.parser.add_option("-l", "--long", action="store_true", - default=False, help="show in long format") + default=False, help=_("show in long format")) self.parser.add_option("-i", "--install-info", action="store_true", - default=False, help="show detailed install info") + default=False, help=_("show detailed install info")) def run(self): self.init(True) @@ -800,7 +800,9 @@ Gives a brief list of PiSi packages published in the repository. def options(self): self.parser.add_option("-l", "--long", action="store_true", - default=False, help="show in long format") + default=False, help=_("show in long format")) + self.parser.add_option("-U", "--uninstalled", action="store_true", + default=False, help=_("show uninstalled packages only")) def run(self): @@ -831,6 +833,8 @@ Gives a brief list of PiSi packages published in the repository. else: lenp = len(p) if p in installed_list: + if ctx.config.get_option('uninstalled'): + continue p = colorize(p, 'cyan') p = p + ' ' * max(0, 15 - lenp) ctx.ui.info('%s - %s ' % (p, unicode(package.summary))) @@ -851,7 +855,7 @@ Gives a brief list of PiSi components published in the repositories. def options(self): self.parser.add_option("-l", "--long", action="store_true", - default=False, help="show in long format") + default=False, help=_("show in long format")) def run(self): @@ -887,7 +891,7 @@ Usage: list-upgrades [ ... repon ] def options(self): self.parser.add_option("-l", "--long", action="store_true", - default=False, help="show in long format") + default=False, help=_("show in long format")) self.parser.add_option("-i", "--install-info", action="store_true", default=False, help=_("show detailed install info")) buildno_opts(self) @@ -995,7 +999,7 @@ Finds the installed package which contains the specified file. def options(self): self.parser.add_option("-l", "--long", action="store_true", - default=False, help="show in long format") + default=False, help=_("show in long format")) self.parser.add_option("-f", "--fuzzy", action="store_true", default=False, help=_("fuzzy search")) diff --git a/pisi/context.py b/pisi/context.py index fb9f0ee8..e2f570ce 100644 --- a/pisi/context.py +++ b/pisi/context.py @@ -29,8 +29,10 @@ def get_option(opt): # default UI is CLI ui = None # not now +dbenv = None installdb = None repodb = None +invidx = None comar = None