* fixx0r 541

This commit is contained in:
Eray Özkural
2005-10-09 21:59:12 +00:00
parent 3564d9b438
commit 722f3668fe
+9 -7
View File
@@ -19,7 +19,6 @@ _ = __trans.ugettext
import pisi import pisi
import pisi.cli import pisi.cli
from pisi.cli import printu
import pisi.context as ctx import pisi.context as ctx
from pisi.uri import URI from pisi.uri import URI
@@ -188,7 +187,7 @@ If run without parameters, it prints the general help."""
def run(self): def run(self):
if not self.args: if not self.args:
self.parser.set_usage(usage_text) self.parser.set_usage(usage_text)
printu(self.parser.format_help()) pisi.cli.printu(self.parser.format_help())
return return
self.init(database = False) self.init(database = False)
@@ -561,6 +560,7 @@ Usage: update-repo <repo1> <repo2> ... <repon>
<repoi>: repository name <repoi>: repository name
Synchronizes the PiSi databases with the current repository. Synchronizes the PiSi databases with the current repository.
If no repositories are given, all repositories are updated.
""" """
__metaclass__ = autocommand __metaclass__ = autocommand
@@ -570,12 +570,14 @@ Synchronizes the PiSi databases with the current repository.
name = ("update-repo", "ur") name = ("update-repo", "ur")
def run(self): def run(self):
if not self.args: self.init(database = True)
self.help()
return
self.init(True) if self.args:
for repo in self.args: repos = self.args
else:
repos = ctx.repodb.list()
for repo in repos:
pisi.api.update_repo(repo) pisi.api.update_repo(repo)
self.finalize() self.finalize()