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
|
@ -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…
Reference in New Issue