WIP: 2024-06-05: args hacking and more (MR 2252)

Continue removing args and do some other optimisations.

Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
Caleb Connolly 2024-06-05 05:31:02 +02:00 committed by Oliver Smith
parent 5bb2390d98
commit de4c912692
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
52 changed files with 498 additions and 464 deletions

View file

@ -9,7 +9,7 @@ import pmb.helpers.package
import pmb.parse
def list_ui(args: PmbArgs, arch):
def list_ui(arch):
"""Get all UIs, for which aports are available with their description.
:param arch: device architecture, for which the UIs must be available
@ -22,7 +22,7 @@ def list_ui(args: PmbArgs, arch):
for path in sorted(context.config.aports.glob("main/postmarketos-ui-*")):
apkbuild = pmb.parse.apkbuild(path)
ui = os.path.basename(path).split("-", 2)[2]
if pmb.helpers.package.check_arch(args, apkbuild["pkgname"], arch):
if pmb.helpers.package.check_arch(apkbuild["pkgname"], arch):
ret.append((ui, apkbuild["pkgdesc"]))
return ret