mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-02-11 20:48:11 +01:00
Updated for choose for upgrade
This commit is contained in:
parent
88e118f08f
commit
e81ec798ee
1 changed files with 18 additions and 12 deletions
|
@ -62,20 +62,26 @@ class Choose(Configs):
|
||||||
|
|
||||||
def choose_for_upgraded(self, data: dict, packages: list):
|
def choose_for_upgraded(self, data: dict, packages: list):
|
||||||
""" Choose packages that they will going to upgrade. """
|
""" Choose packages that they will going to upgrade. """
|
||||||
for pkg in packages:
|
for package in packages:
|
||||||
for package in data.keys():
|
# for package in data.keys():
|
||||||
|
|
||||||
if pkg == package:
|
if package in data.keys():
|
||||||
inst_package: str = self.utils.is_package_installed(package)
|
inst_package: str = self.utils.is_package_installed(package)
|
||||||
inst_package_version: str = self.utils.split_package(inst_package)['version']
|
inst_package_version: str = self.utils.split_package(inst_package)['version']
|
||||||
inst_package_build: str = self.utils.split_package(inst_package)['build']
|
inst_package_build: str = self.utils.split_package(inst_package)['build']
|
||||||
repo_ver: str = data[package]['version']
|
|
||||||
repo_build_tag: str = data[package]['build']
|
|
||||||
|
|
||||||
self.choices.extend(
|
if not inst_package_version:
|
||||||
[(package, f'{inst_package_version} -> {repo_ver}', True,
|
inst_package_version: str = 'None'
|
||||||
f'Installed: {package}-{inst_package_version} Build: {inst_package_build} -> '
|
if not inst_package_build:
|
||||||
f'Available: {repo_ver} Build: {repo_build_tag}')])
|
inst_package_build: str = 'None'
|
||||||
|
|
||||||
|
repo_ver: str = data[package]['version']
|
||||||
|
repo_build_tag: str = data[package]['build']
|
||||||
|
|
||||||
|
self.choices.extend(
|
||||||
|
[(package, f'{inst_package_version} -> {repo_ver}', True,
|
||||||
|
f'Installed: {package}-{inst_package_version} Build: {inst_package_build} -> '
|
||||||
|
f'Available: {repo_ver} Build: {repo_build_tag}')])
|
||||||
|
|
||||||
def choose_for_others(self, data: dict, packages: list):
|
def choose_for_others(self, data: dict, packages: list):
|
||||||
""" Choose packages for others methods like install, tracking etc. """
|
""" Choose packages for others methods like install, tracking etc. """
|
||||||
|
|
Loading…
Add table
Reference in a new issue