Fix resolve dependencies

Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
Dimitris Zlatanidis 2016-10-18 19:23:24 +03:00
parent a7702b103a
commit 39a1ea7d26
3 changed files with 22 additions and 6 deletions

View file

@ -1,6 +1,9 @@
3.1.9 - 17/10/2016
Updated:
- Switch to default version 1.16 for msb repository
Fixed:
- Resolve dependencies to the binaries repositories
- Remove dependencies to the binaries repositories
3.1.8 - 11/10/2016
Added:

View file

@ -23,6 +23,7 @@
from slpkg.utils import Utils
from slpkg.toolbar import status
from slpkg.splitting import split_package
from slpkg.__metadata__ import MetaData as _meta_
@ -35,6 +36,8 @@ def repo_data(PACKAGES_TXT, repo, flag):
(name, location, size, unsize,
rname, rlocation, rsize, runsize) = ([] for i in range(8))
for line in PACKAGES_TXT.splitlines():
if _meta_.rsl_deps in ["on", "ON"] and "--resolve-off" not in flag:
status(0.000005)
if line.startswith("PACKAGE NAME:"):
name.append(line[15:].strip())
if line.startswith("PACKAGE LOCATION:"):

View file

@ -74,6 +74,9 @@ class BinaryInstall(object):
self.msg.reading()
self.PACKAGES_TXT, self.mirror = RepoInit(self.repo).fetch()
self.data = repo_data(self.PACKAGES_TXT, self.repo, self.flag)
self.names = []
for name in self.data[0]:
self.names.append(split_package(name)[0])
self.blacklist = BlackList().packages(self.data[0], self.repo)
def start(self, is_upgrade):
@ -253,12 +256,20 @@ class BinaryInstall(object):
status(0.05)
dependencies = []
dependencies = Utils().dimensional_list(Dependencies(
self.repo, self.blacklist).binary(
dep, self.flag))
requires += dependencies
self.deps_dict[dep] = Utils().remove_dbs(dependencies)
self.repo, self.blacklist).binary(dep, self.flag))
requires += self._fix_deps_repos(dependencies)
self.deps_dict[dep] = Utils().remove_dbs(requires)
return Utils().remove_dbs(requires)
def _fix_deps_repos(self, dependencies):
"""Fix store deps include in repository
"""
requires = []
for dep in dependencies:
if dep in self.names:
requires.append(dep)
return requires
def views(self, install, comp_sum):
"""Views packages
"""
@ -312,8 +323,7 @@ class BinaryInstall(object):
self.data[2], self.data[3]):
if (pk and pkg == split_package(pk)[0] and
pk not in install and
split_package(pk)[0] not in self.blacklist and
split_package(pk)[1] != "blacklist"):
split_package(pk)[0] not in self.blacklist):
dwn.append("{0}{1}/{2}".format(self.mirror, loc, pk))
install.append(pk)
comp_sum.append(comp)