diff --git a/slpkg/upgrade.py b/slpkg/upgrade.py index 8ddb64e0..7ff2689f 100644 --- a/slpkg/upgrade.py +++ b/slpkg/upgrade.py @@ -79,6 +79,7 @@ class Upgrade(Configs): def check_packages(self) -> None: repo_data: dict = {} found_packages: dict = {} + removed_packages: dict = {} if self.repository == '*': repo_data: dict = self.data @@ -113,8 +114,7 @@ class Upgrade(Configs): } if repo == self.repos.slack_repo_name and self.removed_packages: - tag: str = self.utils.split_package(installed.name)['tag'] - if not tag and name not in data.keys(): + if name not in data.keys(): self.id += 1 self.sum_removed += 1 inst_version: str = self.utils.split_package(installed.name)['version'] @@ -122,7 +122,7 @@ class Upgrade(Configs): repo_version: str = '' repo_build: str = '' - found_packages[self.id]: dict = { + removed_packages[self.id]: dict = { 'name': name, 'inst_version': inst_version, 'inst_build': inst_build, @@ -153,14 +153,16 @@ class Upgrade(Configs): 'type': 'add' } - if found_packages: + if found_packages or removed_packages: print() title: str = f"{'packages':<18} {'Repository':<15} {'Build':<6} {'Installed':<15} {'Build':<5} {'Repo':>15}" print(len(title) * '=') print(f'{self.bgreen}{title}{self.endc}') print(len(title) * '=') - for data in found_packages.values(): + all_founded: dict = found_packages | removed_packages + + for data in all_founded.values(): name: str = data['name'] repo_version: str = data['repo_version'] repo_build: str = data['repo_build']