* less cryptic conflict code

This commit is contained in:
Faik Uygur
2006-10-26 09:39:07 +00:00
parent 9994658f87
commit 865970bb52
+9 -9
View File
@@ -195,11 +195,11 @@ in the respective order to satisfy extra dependencies:
upgrade_pisi() upgrade_pisi()
def check_conflict(pkg): def check_conflict(pkg):
conflicts = {} conflicts = []
for c in pkg.conflicts: for conflict in pkg.conflicts:
if pisi.conflict.installed_package_conflicts(c): if pisi.conflict.installed_package_conflicts(conflict):
conflicts[c.package] = str(c) conflicts.append(conflict)
return conflicts return conflicts
@@ -210,12 +210,12 @@ def calculate_conflicts(order, packagedb):
for x in order: for x in order:
pkg = packagedb.get_package(x) pkg = packagedb.get_package(x)
B_p = check_conflict(pkg) conflicts = check_conflict(pkg)
if B_p: if conflicts:
pkg_conflicts[x] = B_p.values() pkg_conflicts[x] = map(lambda c:str(c), conflicts)
C = C.union(B_p.keys()) C = C.union(map(lambda c:c.package, conflicts))
B_i = B_0.intersection(set(map(lambda p:p.package, pkg.conflicts))) B_i = B_0.intersection(set(map(lambda c:c.package, pkg.conflicts)))
D_i = set() D_i = set()
# check if there are any conflicts within the packages that are # check if there are any conflicts within the packages that are
# going to be installed # going to be installed