From ed18bd64b7047622460de43276d69e3a88fc0fa4 Mon Sep 17 00:00:00 2001 From: Faik Uygur Date: Mon, 18 Jun 2007 08:40:53 +0000 Subject: [PATCH] - conflicting package may be installed but an upgrade should solve it. This lookup will be used in "upgrade" path. --- pisi/conflict.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pisi/conflict.py b/pisi/conflict.py index b491b968..5bf60e24 100644 --- a/pisi/conflict.py +++ b/pisi/conflict.py @@ -34,6 +34,16 @@ def package_conflicts(pkg, confs): return None +""" A package in order may be conflicting with an installed package. In this + case pisi should upgrade that conflicting package to a non-conflicting + one if available, instead of yelling and removing the installed package. """ +def satisfying_upgrade_available(conflicting): + try: + pkg = pisi.packagedb.get_package(conflicting.package) + return not conflicting.satisfies_relation(pkg.name, pkg.version, pkg.release) + except pisi.packagedb.Error: + return False + def calculate_conflicts(order, packagedb): # check conflicting packages in the installed system