From 05716580d628f7bc761a2962a1c4671e8b7e54e2 Mon Sep 17 00:00:00 2001 From: Faik Uygur Date: Wed, 6 Dec 2006 08:50:23 +0000 Subject: [PATCH] =?UTF-8?q?*=20-c=20[--component]=C2=A0to=20pisi=20up.=20T?= =?UTF-8?q?his=20was=20missed.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit also no need to fill packages with installed packages if it is empty - as in pisi up -... api.upgrade() do this for us. BUG:FIXED:4163 --- pisi/cli/commands.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pisi/cli/commands.py b/pisi/cli/commands.py index 12313069..0ca76dec 100644 --- a/pisi/cli/commands.py +++ b/pisi/cli/commands.py @@ -656,6 +656,8 @@ expanded to package names. default=False, help=_("Ignore file conflicts")) group.add_option("--ignore-package-conflicts", action="store_true", default=False, help=_("Ignore package conflicts")) + group.add_option("-c", "--component", action="append", + default=None, help=_("Upgrade component's and recursive components' packages")) group.add_option("-f", "--fetch-only", action="store_true", default=False, help=_("Fetch upgrades but do not install.")) group.add_option("-x", "--exclude", action="append", @@ -708,10 +710,13 @@ expanded to package names. else: ctx.ui.info(_('Will not update repositories')) - if not self.args: - packages = ctx.installdb.list_installed() - else: - packages = self.args + components = ctx.get_option('component') + packages = [] + if components: + for name in components: + if ctx.componentdb.has_component(name): + packages.extend(ctx.componentdb.get_union_packages(name, walk=True)) + packages.extend(self.args) if ctx.get_option('exclude_from'): packages = self.exclude_from(packages)