From 722f3668fe0afdee8986c994e0e45a87add4c1ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20=C3=96zkural?= Date: Sun, 9 Oct 2005 21:59:12 +0000 Subject: [PATCH] * fixx0r 541 --- pisi/cli/commands.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/pisi/cli/commands.py b/pisi/cli/commands.py index 89bb56c4..db10f583 100644 --- a/pisi/cli/commands.py +++ b/pisi/cli/commands.py @@ -19,7 +19,6 @@ _ = __trans.ugettext import pisi import pisi.cli -from pisi.cli import printu import pisi.context as ctx from pisi.uri import URI @@ -188,7 +187,7 @@ If run without parameters, it prints the general help.""" def run(self): if not self.args: self.parser.set_usage(usage_text) - printu(self.parser.format_help()) + pisi.cli.printu(self.parser.format_help()) return self.init(database = False) @@ -561,6 +560,7 @@ Usage: update-repo ... : repository name Synchronizes the PiSi databases with the current repository. +If no repositories are given, all repositories are updated. """ __metaclass__ = autocommand @@ -570,12 +570,14 @@ Synchronizes the PiSi databases with the current repository. name = ("update-repo", "ur") def run(self): - if not self.args: - self.help() - return + self.init(database = True) - self.init(True) - for repo in self.args: + if self.args: + repos = self.args + else: + repos = ctx.repodb.list() + + for repo in repos: pisi.api.update_repo(repo) self.finalize()