From e96d2d43968b03feda169b087ee21038d4c17e25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20=C3=96zkural?= Date: Mon, 27 Mar 2006 17:23:18 +0000 Subject: [PATCH] * update repos in upgrade command, easier use, yep :) --- pisi/cli/commands.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pisi/cli/commands.py b/pisi/cli/commands.py index c690f448..6a71cf51 100644 --- a/pisi/cli/commands.py +++ b/pisi/cli/commands.py @@ -513,6 +513,8 @@ expanded to package names. super(Upgrade, self).options() buildno_opts(self) p = self.parser + p.add_option("-r", "--bypass-update-repo", action="store_true", + default=False, help=_("Do not update repositories")) p.add_option("", "--bypass-ldconfig", action="store_true", default=False, help=_("Bypass ldconfig phase")) self.parser.add_option("-e", "--eager", action="store_true", @@ -521,6 +523,14 @@ expanded to package names. def run(self): self.init() + if not ctx.get_option('bypass_update_repo'): + ctx.ui.info(_('Updating repositories')) + repos = ctx.repodb.list() + for repo in repos: + pisi.api.update_repo(repo) + else: + ctx.ui.info(_('Will not update repositories')) + if not self.args: packages = ctx.installdb.list_installed() else: