From c2fab04affcc3006fd0d77d3f18144c7277ace9c Mon Sep 17 00:00:00 2001 From: Faik Uygur Date: Wed, 19 Nov 2008 09:37:21 +0000 Subject: [PATCH] Make install first fetch and then install.. This should fix many problems.. Also fixes #8623 BUG:FIXED:8623 --- pisi/atomicoperations.py | 3 --- pisi/operations/install.py | 16 +++++++++++++++- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/pisi/atomicoperations.py b/pisi/atomicoperations.py index 80df0a1c..d471ce99 100644 --- a/pisi/atomicoperations.py +++ b/pisi/atomicoperations.py @@ -116,9 +116,6 @@ class Install(AtomicOperation): self.operation = INSTALL def install(self, ask_reinstall = True): - if ctx.get_option('fetch_only'): - return - ctx.ui.status(_('Installing %s, version %s, release %s, build %s') % (self.pkginfo.name, self.pkginfo.version, self.pkginfo.release, self.pkginfo.build)) diff --git a/pisi/operations/install.py b/pisi/operations/install.py index 6c2c6a33..8354bcc1 100644 --- a/pisi/operations/install.py +++ b/pisi/operations/install.py @@ -81,8 +81,22 @@ def install_pkg_names(A, reinstall = False): ctx.ui.notify(ui.packagestogo, order = order) + ignore_dep = ctx.config.get_option('ignore_dependency') + + paths = [] for x in order: - atomicoperations.install_single_name(x, True) # allow reinstalls here + ctx.ui.info(util.colorize(_("Downloading %d / %d") % (order.index(x)+1, len(order)), "yellow")) + 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: + ctx.ui.info(util.colorize(_("Installing %d / %d") % (paths.index(path)+1, len(paths)), "yellow")) + install_op = atomicoperations.Install(path, ignore_file_conflicts = True) + install_op.install(False) return True