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.
This commit is contained in:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user