mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-11-16 07:47:35 +01:00
Updated for remove
This commit is contained in:
parent
af754e90d9
commit
20f9e0e955
1 changed files with 9 additions and 15 deletions
|
@ -79,7 +79,6 @@ 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
|
||||
|
@ -114,20 +113,19 @@ class Upgrade(Configs):
|
|||
}
|
||||
|
||||
if repo == self.repos.slack_repo_name and self.removed_packages:
|
||||
if name not in data.keys():
|
||||
tag: str = self.utils.split_package(installed.name)['tag']
|
||||
if not tag and name not in data.keys():
|
||||
self.id += 1
|
||||
self.sum_removed += 1
|
||||
inst_version: str = self.utils.split_package(installed.name)['version']
|
||||
inst_build: str = self.utils.split_package(installed.name)['build']
|
||||
repo_version: str = ''
|
||||
repo_build: str = ''
|
||||
|
||||
removed_packages[self.id]: dict = {
|
||||
found_packages[self.id]: dict = {
|
||||
'name': name,
|
||||
'inst_version': inst_version,
|
||||
'inst_build': inst_build,
|
||||
'repo_version': repo_version,
|
||||
'repo_build': repo_build,
|
||||
'repo_version': '',
|
||||
'repo_build': '',
|
||||
'repo': repo,
|
||||
'type': 'remove'
|
||||
}
|
||||
|
@ -138,31 +136,27 @@ class Upgrade(Configs):
|
|||
if name not in self.installed_names:
|
||||
self.id += 1
|
||||
self.sum_added += 1
|
||||
inst_version: str = ''
|
||||
inst_build: str = ''
|
||||
repo_version: str = data[name]['version']
|
||||
repo_build: str = data[name]['build']
|
||||
|
||||
found_packages[self.id]: dict = {
|
||||
'name': name,
|
||||
'inst_version': inst_version,
|
||||
'inst_build': inst_build,
|
||||
'inst_version': '',
|
||||
'inst_build': '',
|
||||
'repo_version': repo_version,
|
||||
'repo_build': repo_build,
|
||||
'repo': self.repos.slack_repo_name,
|
||||
'type': 'add'
|
||||
}
|
||||
|
||||
if found_packages or removed_packages:
|
||||
if found_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) * '=')
|
||||
|
||||
all_founded: dict = found_packages | removed_packages
|
||||
|
||||
for data in all_founded.values():
|
||||
for data in found_packages.values():
|
||||
name: str = data['name']
|
||||
repo_version: str = data['repo_version']
|
||||
repo_build: str = data['repo_build']
|
||||
|
|
Loading…
Reference in a new issue