mirror of
https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git
synced 2025-07-13 11:29:46 +03:00
Fix/add helpers.devices.list_{apkbuilds,deviceinfos}() (!1737)
This fixes list_apkbuilds which is dead code currently but is useful for external software using pmbootstrap. It also adds list_deviceinfos which does the same thing but for the deviceinfo data. The plan is to add an API later, where both functions can be used.
This commit is contained in:
parent
50a26dcca4
commit
e468d51dae
1 changed files with 11 additions and 1 deletions
|
@ -39,6 +39,16 @@ def list_apkbuilds(args):
|
|||
"""
|
||||
ret = {}
|
||||
for device in list(args):
|
||||
apkbuild_path = args.aports + "/device-" + device + "/APKBUILD"
|
||||
apkbuild_path = args.aports + "/device/device-" + device + "/APKBUILD"
|
||||
ret[device] = pmb.parse.apkbuild(args, apkbuild_path)
|
||||
return ret
|
||||
|
||||
|
||||
def list_deviceinfos(args):
|
||||
"""
|
||||
:returns: { "first-device": {"name": ..., "screen_width": ...}, ... }
|
||||
"""
|
||||
ret = {}
|
||||
for device in list(args):
|
||||
ret[device] = pmb.parse.deviceinfo(args, device)
|
||||
return ret
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue