Updated for resolve off

This commit is contained in:
Dimitris Zlatanidis 2023-03-28 17:18:57 +03:00
parent cfa2cb7327
commit a5b7a547db

View file

@ -77,24 +77,28 @@ class Packages(Configs):
def dependencies(self):
""" Creating te dependencies list and the order for install. """
requires: list = []
for pkg in self.packages:
self.packages_requires += Required(pkg, self.repo).resolve()
# Clean dependencies from the dependencies list if already added with main packages.
for req in self.packages_requires:
if req not in self.packages and req in self.repo_package_names:
requires.append(req)
if not self.utils.is_option(self.flag_resolve_off, self.flags):
requires = list(set(requires))
for pkg in self.packages:
self.packages_requires += Required(pkg, self.repo).resolve()
if requires:
self.packages_requires = self.choose_dependencies(requires)
# Clean dependencies from the dependencies list if already added with main packages.
for req in self.packages_requires:
if req not in self.packages and req in self.repo_package_names:
requires.append(req)
requires = list(set(requires))
if requires:
self.packages_requires = self.choose_dependencies(requires)
self.install_order = [*self.packages_requires, *self.packages]
def download(self) -> None:
""" Download packages from the repositories. """
pkg_urls: list = []
for pkg in self.install_order:
if not self.skip_installed_package(pkg):
@ -137,8 +141,9 @@ class Packages(Configs):
self.multi_process(command, package, message)
name: str = self.utils.split_binary_pkg(package[:-4])[0]
self.logging_installed_dependencies(name)
if not self.utils.is_option(self.flag_resolve_off, self.flags):
name: str = self.utils.split_binary_pkg(package[:-4])[0]
self.logging_installed_dependencies(name)
def logging_installed_dependencies(self, name: str) -> None:
""" Logging installed dependencies and used for remove. """