Kaydet (Commit) 3c223f21 authored tarafından Fatih Aşıcı's avatar Fatih Aşıcı

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"
üst d6849c5b
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment