From dc461eff53077fba2fa9944aaa0c010bc4fe30ce Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Sat, 8 Apr 2023 23:40:00 +0300 Subject: [PATCH] Fixed for black packages --- slpkg/tracking.py | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/slpkg/tracking.py b/slpkg/tracking.py index 46b09c4c..101e232f 100644 --- a/slpkg/tracking.py +++ b/slpkg/tracking.py @@ -4,6 +4,7 @@ from slpkg.configs import Configs from slpkg.views.ascii import Ascii from slpkg.utilities import Utilities +from slpkg.blacklist import Blacklist from slpkg.sbos.queries import SBoQueries from slpkg.binaries.queries import BinQueries @@ -19,6 +20,7 @@ class Tracking(Configs): self.ascii = Ascii() self.color = self.colour() self.utils = Utilities() + self.black = Blacklist() self.llc: str = self.ascii.lower_left_corner self.hl: str = self.ascii.horizontal_line @@ -76,20 +78,22 @@ class Tracking(Configs): 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 req not in self.black.packages(): - if self.flag_pkg_version: + require: str = f'{self.cyan}{req}{self.endc}' - if self.repo_for_binaries: - version: str = f" {self.yellow}{bin_repo_dict[req][0]}{self.endc}" + if self.flag_pkg_version: + + if self.repo_for_binaries: + version: str = f" {self.yellow}{bin_repo_dict[req][0]}{self.endc}" + else: + version: str = f" {self.yellow}{sbo_repo_dict[req][2]}{self.endc}" + + require: str = f'{self.cyan}{req}{self.endc}{version}' + + if i == 1: + print(f' {require}') else: - version: str = f" {self.yellow}{sbo_repo_dict[req][2]}{self.endc}" - - require: str = f'{self.cyan}{req}{self.endc}{version}' - - if i == 1: - print(f' {require}') - else: - print(f'{sp}{require}') + print(f'{sp}{require}') print(f'\n{self.grey}{how_many} dependencies for {package}{self.endc}\n')