mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-12-26 09:58:31 +01:00
Switch for generator
This commit is contained in:
parent
16da4eec5a
commit
3afe3145b2
1 changed files with 2 additions and 5 deletions
|
@ -25,7 +25,7 @@ class Utilities:
|
|||
|
||||
def is_installed(self, name: str) -> str:
|
||||
""" Returns the installed package name. """
|
||||
installed = self.all_installed()
|
||||
installed = list(self.all_installed())
|
||||
|
||||
for package in installed:
|
||||
pkg = self.split_installed_pkg(package)[0]
|
||||
|
@ -37,15 +37,12 @@ class Utilities:
|
|||
|
||||
def all_installed(self) -> list:
|
||||
""" Return all installed SBo packages from /val/log/packages folder. """
|
||||
installed = []
|
||||
pattern = f'*{self.configs.sbo_repo_tag}'
|
||||
var_log_packages = Path(self.configs.log_packages)
|
||||
|
||||
for file in var_log_packages.glob(pattern):
|
||||
if self.split_installed_pkg(file.name) not in self.black.get():
|
||||
installed.append(file.name)
|
||||
|
||||
return installed
|
||||
yield file.name
|
||||
|
||||
@staticmethod
|
||||
def untar_archive(path: str, archive: str, ext_path: str):
|
||||
|
|
Loading…
Reference in a new issue