From 3c223f21b79954e3e3ddc736ddd557f7490d02f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fatih=20A=C5=9F=C4=B1c=C4=B1?= Date: Tue, 27 Apr 2010 17:29:55 +0000 Subject: [PATCH] upgrade: Fix the logic when finding broken packages Usually the reverse dependency gets broken *after* the upgrade is done. So, we must check the dependency info with satisfied_by_repo instead of satisfied_by_installed. This commit will hopefully fix the upgrade operations failing with: "Reverse dependency X of Y cannot be satisfied" --- pisi/operations/upgrade.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/pisi/operations/upgrade.py b/pisi/operations/upgrade.py index 4c59f3bb..6e003566 100644 --- a/pisi/operations/upgrade.py +++ b/pisi/operations/upgrade.py @@ -271,16 +271,12 @@ def plan_upgrade(A, force_replaced=True, replaces=None): rev_deps = installdb.get_rev_deps(pkg.name) for rev_dep, depinfo in rev_deps: # add only installed but unsatisfied reverse dependencies - if rev_dep in G_f.vertices() or \ - depinfo.satisfied_by_installed() or \ - not is_upgradable(rev_dep): + if rev_dep in G_f.vertices() or depinfo.satisfied_by_repo(): continue - if not depinfo.satisfied_by_repo(): - raise Exception(_('Reverse dependency %s of %s cannot be satisfied') % (rev_dep, pkg.name)) - - Bp.add(rev_dep) - G_f.add_plain_dep(rev_dep, pkg.name) + if is_upgradable(rev_dep): + Bp.add(rev_dep) + G_f.add_plain_dep(rev_dep, pkg.name) def add_needed_revdeps(pkg, Bp): # Search for reverse dependency update needs of to be upgraded packages