From 1abb1425837d0c9c7b984f485ff26cc616f90779 Mon Sep 17 00:00:00 2001 From: Faik Uygur Date: Sun, 26 Nov 2006 19:55:49 +0000 Subject: [PATCH] * system.base packages and packages other than system.base's have no dependency relationship. So this is the quickest and safest way i think by not touching the dependency code, and leaving it generic for any package. The dependency ordering relations of these two groups (system.base packages and other than system.base packages) are handled within each other. the systembase_order holds this relational dependency order, the "order" variable holds the not system.base packages relational dependency order. So by combining these as systebase_order + order the dependency relations should not be harmed and the system.base packages first rule is satisfied. BUG:FIXED:4211 --- pisi/api.py | 2 +- pisi/operations.py | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pisi/api.py b/pisi/api.py index 30b71ce5..dcce7439 100644 --- a/pisi/api.py +++ b/pisi/api.py @@ -222,7 +222,7 @@ def generate_base_upgrade(A): # method returns the currently needed system.base component install and # upgrade needs base = upgrade_base(A, ignore_package_conflicts = True) - return list(base) + return base def generate_conflicts(A): # returns the conflicting packages list of the to be installed packages. diff --git a/pisi/operations.py b/pisi/operations.py index 8ed97124..f35366af 100644 --- a/pisi/operations.py +++ b/pisi/operations.py @@ -298,7 +298,7 @@ def upgrade_base(A = set(), ignore_package_conflicts = False): util.strlist(extra_upgrades)) G_f, upgrade_order = plan_upgrade(extra_upgrades, ignore_build) # return packages that must be added to any installation - return set(install_order + upgrade_order) + return install_order + upgrade_order else: ctx.ui.warning(_('Safety switch: the component system.base cannot be found')) return set() @@ -325,7 +325,7 @@ def install_pkg_names(A, reinstall = False): ctx.ui.info(_('No packages to install.')) return - A |= upgrade_base(A) + systembase_order = upgrade_base(A) if not ctx.config.get_option('ignore_dependency'): G_f, order = plan_install_pkg_names(A) @@ -333,6 +333,8 @@ def install_pkg_names(A, reinstall = False): G_f = None order = list(A) + order = systembase_order + order + if len(order) > 1: ctx.ui.info(_("Following packages will be installed in the respective " "order to satisfy dependencies:\n") + util.strlist(order)) @@ -448,7 +450,7 @@ def upgrade_pkg_names(A = []): ctx.ui.info(_('No packages to upgrade.')) return True - A |= upgrade_base(A) + systembase_order = upgrade_base(A) ctx.ui.debug('A = %s' % str(A)) @@ -458,6 +460,8 @@ def upgrade_pkg_names(A = []): G_f = None order = list(A) + order = systembase_order + order + if not ctx.get_option('ignore_package_conflicts'): conflicts = check_conflicts(order, ctx.packagedb)