BugFixed upgrade packages

This commit is contained in:
Dimitris Zlatanidis 2023-01-14 19:56:11 +02:00
parent c34caa1b66
commit e8e733173e
3 changed files with 13 additions and 16 deletions

View file

@ -1,8 +1,8 @@
4.4.9 - 13/01/2023
Updated:
- Color highlight for installed packages
Fixed:
- Upgarde packages
BugFixed:
- Upgrade packages (Thanks to marav)
4.4.8 - 12/01/2023
Added:

View file

@ -170,15 +170,15 @@ class Argparse:
for package in repo_packages:
for pkg in packages:
if pkg in package:
if method == 'install' and pkg in package:
repo_ver = SBoQueries(package).version()
choices += [(package, repo_ver, False)]
if method == 'upgrade':
elif method == 'upgrade' and pkg == package:
repo_ver = SBoQueries(package).version()
pkg = self.utils.is_installed(package)
inst_ver = self.utils.split_installed_pkg(pkg)[1]
choices += [(package, f'{inst_ver} -> {repo_ver}', True)]
else:
choices += [(package, repo_ver, False)]
if not choices:
return packages

View file

@ -28,10 +28,7 @@ class Upgrade:
for pkg in installed:
inst_pkg_name = self.utils.split_installed_pkg(pkg)[0]
if (pkg.endswith(self.configs.sbo_repo_tag)
and inst_pkg_name not in black):
if inst_pkg_name in repo_packages:
if inst_pkg_name not in black and inst_pkg_name in repo_packages:
if self.utils.is_repo_version_bigger(inst_pkg_name):
requires += Requires(inst_pkg_name).resolve()