From b698b91895b17819896ba1af48fe70b99b7eb36d Mon Sep 17 00:00:00 2001 From: Faik Uygur Date: Fri, 27 Oct 2006 21:38:24 +0000 Subject: [PATCH] * generate_conflicts to api. --- pisi/api.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pisi/api.py b/pisi/api.py index b850c94e..bb92ba2b 100644 --- a/pisi/api.py +++ b/pisi/api.py @@ -36,7 +36,7 @@ from pisi.index import Index import pisi.cli from pisi.operations import install, remove, upgrade, emerge from pisi.operations import plan_install_pkg_names as plan_install -from pisi.operations import plan_remove, plan_upgrade, upgrade_base +from pisi.operations import plan_remove, plan_upgrade, upgrade_base, calculate_conflicts from pisi.build import build_until from pisi.atomicoperations import resurrect_package, build from pisi.metadata import MetaData @@ -219,6 +219,15 @@ def generate_base_upgrade(A): base = upgrade_base(A, ignore_package_conflicts = True) return list(base) +def generate_conflicts(A): + # returns the conflicting packages list of the to be installed packages. + # @C: conflicting and must be removed packages list to proceed + # @D: list of the conflicting packages _with each other_ in the to be installed list + # @E: dictionary that contains which package in the to be installed list conflicts + # with which packages + + (C, D, E) = calculate_conflicts(A, ctx.packagedb) + def configure_pending(): # start with pending packages # configure them in reverse topological order of dependency