mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-12-27 09:58:10 +01:00
Updated method
Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
parent
e57478cee7
commit
d1c2560782
1 changed files with 5 additions and 5 deletions
|
@ -332,17 +332,17 @@ class View(Configs): # pylint: disable=[R0902]
|
||||||
print()
|
print()
|
||||||
|
|
||||||
def missing_dependencies(self, packages: list) -> None:
|
def missing_dependencies(self, packages: list) -> None:
|
||||||
""" Checks for missing dependencies.
|
""" View for missing dependencies.
|
||||||
"""
|
"""
|
||||||
not_found: dict = {}
|
missing_deps: dict = {}
|
||||||
for package in packages:
|
for package in packages:
|
||||||
requires: list = self.data[package]['requires']
|
requires: list = self.data[package]['requires']
|
||||||
for req in requires:
|
for req in requires:
|
||||||
if req not in self.data:
|
if req not in self.data:
|
||||||
not_found[package] = [req for req in requires if req not in self.data]
|
missing_deps[package] = [req for req in requires if req not in self.data]
|
||||||
if not_found:
|
if missing_deps:
|
||||||
print('\nPackages with missing dependencies:')
|
print('\nPackages with missing dependencies:')
|
||||||
for pkg, deps in not_found.items():
|
for pkg, deps in missing_deps.items():
|
||||||
print(f"> {self.cyan}{pkg}{self.endc}: Requires "
|
print(f"> {self.cyan}{pkg}{self.endc}: Requires "
|
||||||
f"({len(deps)}) -> {self.red}{', '.join(deps)}{self.endc}")
|
f"({len(deps)}) -> {self.red}{', '.join(deps)}{self.endc}")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue