From f8fe17886e01ca7eb49e51ea99ded2361315cac7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fatih=20A=C5=9F=C4=B1c=C4=B1?= Date: Mon, 22 Mar 2010 22:17:58 +0000 Subject: [PATCH] upgrade: Take all deps into account for the correct upgrade order This commit gets back the old logic changed by the recent commits. --- pisi/operations/upgrade.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pisi/operations/upgrade.py b/pisi/operations/upgrade.py index 562ca479..4c59f3bb 100644 --- a/pisi/operations/upgrade.py +++ b/pisi/operations/upgrade.py @@ -255,7 +255,12 @@ def plan_upgrade(A, force_replaced=True, replaces=None): if dep.satisfied_by_repo(): if not dep.package in G_f.vertices(): Bp.add(str(dep.package)) - G_f.add_dep(pkg.name, dep) + + # Always add the dependency info although the dependant + # package is already a member of this graph. Upgrade order + # might change if the dependency info differs from the + # previous ones. + G_f.add_dep(pkg.name, dep) else: ctx.ui.error(_('Dependency %s of %s cannot be satisfied') % (dep, pkg.name)) raise Exception(_("Upgrade is not possible."))