mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-12-27 09:58:10 +01:00
Switch for inheritance
This commit is contained in:
parent
0fb7046732
commit
68f28caaab
1 changed files with 6 additions and 6 deletions
|
@ -8,12 +8,12 @@ from slpkg.dependencies import Requires
|
|||
from slpkg.configs import Configs
|
||||
|
||||
|
||||
class Upgrade:
|
||||
class Upgrade(Configs, Utilities):
|
||||
""" Upgrade the installed packages. """
|
||||
|
||||
def __init__(self):
|
||||
self.utils = Utilities()
|
||||
self.conf = Configs()
|
||||
super(Configs, self).__init__()
|
||||
super(Utilities, self).__init__()
|
||||
|
||||
def packages(self):
|
||||
""" Compares version of packages and returns the maximum. """
|
||||
|
@ -21,14 +21,14 @@ class Upgrade:
|
|||
black = Blacklist().get()
|
||||
upgrade, requires = [], []
|
||||
|
||||
installed = self.utils.all_installed(f'*{self.conf.sbo_repo_tag}')
|
||||
installed = self.all_installed(f'*{self.sbo_repo_tag}')
|
||||
|
||||
for pkg in installed:
|
||||
inst_pkg_name = self.utils.split_installed_pkg(pkg)[0]
|
||||
inst_pkg_name = self.split_installed_pkg(pkg)[0]
|
||||
|
||||
if inst_pkg_name not in black and inst_pkg_name in repo_packages:
|
||||
|
||||
if self.utils.is_repo_version_bigger(inst_pkg_name):
|
||||
if self.is_repo_version_bigger(inst_pkg_name):
|
||||
requires += Requires(inst_pkg_name).resolve()
|
||||
upgrade.append(inst_pkg_name)
|
||||
|
||||
|
|
Loading…
Reference in a new issue