From 0d7bba65c98db468f46647ff17f9623e8175c262 Mon Sep 17 00:00:00 2001 From: Faik Uygur Date: Thu, 26 Oct 2006 18:30:11 +0000 Subject: [PATCH] The previous code is below. I could not understand this code. It was written when conflicts were string. It traverses between the conflict strings of the to be installed package and then for every conflict it always looks if the _to be installed package_ is installed. If it is installed then raises conflict with the conflicting package ???? # check conflicts for pkg in self.metadata.package.conflicts: if ctx.installdb.is_installed(self.pkginfo): raise Error(_("Package conflicts %s") % pkg) First of all this code was not working. Because is_installed takes package_name, But str(pkginfo) is given. So it never worked. I tried to fix this with this code, but this check is not needed. Because no one uses or should use Install directly. This is internal pisi code. If api is used the proper conflict checks are done already. --- pisi/atomicoperations.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pisi/atomicoperations.py b/pisi/atomicoperations.py index 3884f62c..dd1ba385 100644 --- a/pisi/atomicoperations.py +++ b/pisi/atomicoperations.py @@ -141,11 +141,6 @@ class Install(AtomicOperation): com = comariface.make_com() def check_relations(self): - # check conflicts - for conf in self.metadata.package.conflicts: - if pisi.conflict.installed_package_conflicts(conf): - raise Error(_("Package conflicts %s") % conf) - # check dependencies if not ctx.config.get_option('ignore_dependency'): if not self.pkginfo.installable():