Fixed for required

This commit is contained in:
Dimitris Zlatanidis 2023-04-01 10:27:38 +03:00
parent d0a72541f1
commit 3776a19977

View file

@ -15,15 +15,25 @@ class Required:
self.repos = Repositories()
self.repo_package_names: list = BinQueries(name, self.repo).all_package_names_by_repo()
self.special_repos: list = [
self.repos.salixos_repo_name,
self.repos.slackel_repo_name,
self.repos.slint_repo_name
]
def resolve(self) -> list:
""" Resolve the dependencies. """
required: list[str] = BinQueries(self.name, self.repo).required()
if self.repos.salixos_repo_name:
return required
if self.repo in self.special_repos:
requires: list = []
for req in required:
if req in self.repo_package_names:
requires.append(req)
return requires
for req in required:
if req:
if req and req in self.repo_package_names:
sub_required: list[str] = BinQueries(req, self.repo).required()
for sub in sub_required: