mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-30 20:34:38 +01:00
Updated to generator
This commit is contained in:
parent
25e854963c
commit
5af8876956
1 changed files with 4 additions and 5 deletions
|
@ -37,7 +37,8 @@ from slpkg.sbo.greps import SBoGrep
|
||||||
def sbo_upgrade(skip, flag):
|
def sbo_upgrade(skip, flag):
|
||||||
"""Return packages for upgrade
|
"""Return packages for upgrade
|
||||||
"""
|
"""
|
||||||
Msg().checking()
|
msg = Msg()
|
||||||
|
msg.checking()
|
||||||
upgrade_names = []
|
upgrade_names = []
|
||||||
data = SBoGrep(name="").names()
|
data = SBoGrep(name="").names()
|
||||||
blacklist = BlackList().get_black()
|
blacklist = BlackList().get_black()
|
||||||
|
@ -49,7 +50,7 @@ def sbo_upgrade(skip, flag):
|
||||||
package = f"{name}-{ver}"
|
package = f"{name}-{ver}"
|
||||||
if parse_version(sbo_package) > parse_version(package):
|
if parse_version(sbo_package) > parse_version(package):
|
||||||
upgrade_names.append(name)
|
upgrade_names.append(name)
|
||||||
Msg().done()
|
msg.done()
|
||||||
if "--checklist" in flag:
|
if "--checklist" in flag:
|
||||||
upgrade_names = choose_upg(upgrade_names)
|
upgrade_names = choose_upg(upgrade_names)
|
||||||
return upgrade_names
|
return upgrade_names
|
||||||
|
@ -58,8 +59,6 @@ def sbo_upgrade(skip, flag):
|
||||||
def sbo_list():
|
def sbo_list():
|
||||||
"""Return all SBo packages
|
"""Return all SBo packages
|
||||||
"""
|
"""
|
||||||
sbo_packages = []
|
|
||||||
for pkg in os.listdir(_meta_.pkg_path):
|
for pkg in os.listdir(_meta_.pkg_path):
|
||||||
if pkg.endswith("_SBo"):
|
if pkg.endswith("_SBo"):
|
||||||
sbo_packages.append(pkg)
|
yield pkg
|
||||||
return sbo_packages
|
|
Loading…
Add table
Reference in a new issue