From 3a3aa1288d341f97f3703b3e4a436c8b5950cd6d Mon Sep 17 00:00:00 2001 From: Faik Uygur Date: Thu, 24 Aug 2006 11:03:13 +0000 Subject: [PATCH] * With --fetch-only you can fetch updated packages at a place which has a fast connection but you do not need to wait them to be installed. You can always upgrade anywhere else with the cached packages. (Onursan's special request) --- pisi/cli/commands.py | 2 ++ pisi/operations.py | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/pisi/cli/commands.py b/pisi/cli/commands.py index c005d7be..9ced5d9e 100644 --- a/pisi/cli/commands.py +++ b/pisi/cli/commands.py @@ -567,6 +567,8 @@ expanded to package names. default=False, help=_("Ignore file conflicts")) p.add_option("-e", "--eager", action="store_true", default=False, help=_("eager upgrades")) + p.add_option("-f", "--fetch-only", action="store_true", + default=False, help=_("Fetch upgrades but do not install.")) def run(self): self.init() diff --git a/pisi/operations.py b/pisi/operations.py index 7a04ee4c..23c0b3c5 100644 --- a/pisi/operations.py +++ b/pisi/operations.py @@ -467,6 +467,10 @@ def upgrade_pkg_names(A = []): for x in order: install_op = atomicoperations.Install.from_name(x) paths.append(install_op.package_fname) + + # fetch to be upgraded packages but do not install them. + if ctx.get_option('fetch_only'): + return for path in paths: install_op = atomicoperations.Install(path, ignore_file_conflicts = True)