Fixed for tracking version

This commit is contained in:
Dimitris Zlatanidis 2023-03-30 18:17:10 +03:00
parent fa0c9ea17a
commit 343b15d884

View file

@ -37,12 +37,13 @@ class Tracking(Configs):
char: str = f' {self.llc}{self.hl}'
sp: str = ' ' * 4
for package in packages:
pkg = f'{self.yellow}{package}{self.endc}'
if self.utils.is_option(self.flag_pkg_version, self.flags):
version: str = SBoQueries(package).version()
version: str = SBoQueries(package).version()
if self.utils.is_option(self.flag_bin_repository, self.flags):
version: str = BinQueries(package, repo).version()
@ -55,25 +56,26 @@ class Tracking(Configs):
how_many: int = len(requires)
if not requires:
requires: list = ['No dependencies']
print(pkg)
print(char, end='')
for i, req in enumerate(requires, start=1):
require: str = f'{self.cyan}{req}{self.endc}'
if self.utils.is_option(self.flag_pkg_version, self.flags):
version: str = f"-{self.yellow}{SBoQueries(req).version()}{self.endc}"
if not requires:
print(f' {self.cyan}No dependencies{self.endc}')
else:
for i, req in enumerate(requires, start=1):
require: str = f'{self.cyan}{req}{self.endc}'
if self.utils.is_option(self.flag_bin_repository, self.flags):
version: str = f"-{self.yellow}{BinQueries(req, repo).version()}{self.endc}"
if self.utils.is_option(self.flag_pkg_version, self.flags):
require: str = f'{self.cyan}{req}{self.endc}{version}'
version: str = f"-{self.yellow}{SBoQueries(req).version()}{self.endc}"
if self.utils.is_option(self.flag_bin_repository, self.flags):
version: str = f"-{self.yellow}{BinQueries(req, repo).version()}{self.endc}"
if i == 1:
print(f' {self.cyan}{requires[0]}{self.endc}')
else:
print(f'{sp}{require}')
require: str = f'{self.cyan}{req}{self.endc}{version}'
if i == 1:
print(f' {require}')
else:
print(f'{sp}{require}')
print(f'\n{self.grey}{how_many} dependencies for {package}{self.endc}\n')