diff --git a/pisi/cli/listcomponents.py b/pisi/cli/listcomponents.py index 17ff7fb2..c1811de3 100644 --- a/pisi/cli/listcomponents.py +++ b/pisi/cli/listcomponents.py @@ -40,13 +40,15 @@ repositories. group = optparse.OptionGroup(self.parser, _("list-components options")) group.add_option("-l", "--long", action="store_true", default=False, help=_("Show in long format")) + group.add_option("-r", "--repository", action="store", + type="string", default=None, help=_('Name of the source or package repository')) self.parser.add_option_group(group) def run(self): self.init(database = True, write = False) - l = self.componentdb.list_components() + l = self.componentdb.list_components(ctx.get_option('repository')) l.sort() for p in l: component = self.componentdb.get_component(p)