1
0
Fork 1
mirror of https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git synced 2025-07-13 11:29:46 +03:00

Rename deviceinfo variable flash_methods to flash_method (#1030)

* Rename deviceinfo variable flash_methods to flash_method
* Update pmb.config.deviceinfo_attributes / add sanity check
* Add test case that parses all deviceinfo files
This commit is contained in:
Attila Szöllősi 2017-12-21 23:12:52 +01:00 committed by Oliver Smith
parent d34e8d172e
commit c6eb56c200
91 changed files with 188 additions and 132 deletions

View file

@ -68,7 +68,7 @@ def system(args):
" please run 'pmbootstrap install' first.")
# Do not flash if using fastboot & image is too large
method = args.flash_method or args.deviceinfo["flash_methods"]
method = args.flash_method or args.deviceinfo["flash_method"]
if method == "fastboot" and args.deviceinfo["flash_fastboot_max_size"]:
img_size = os.path.getsize(args.work + "/chroot_native" + img_path) / 1024**2
max_size = int(args.deviceinfo["flash_fastboot_max_size"])
@ -86,7 +86,7 @@ def list_devices(args):
def sideload(args):
method = args.flash_method or args.deviceinfo["flash_methods"]
method = args.flash_method or args.deviceinfo["flash_method"]
cfg = pmb.config.flashers[method]
# Install depends
@ -112,7 +112,7 @@ def sideload(args):
def frontend(args):
action = args.action_flasher
method = args.flash_method or args.deviceinfo["flash_methods"]
method = args.flash_method or args.deviceinfo["flash_method"]
if method == "none" and action in ["boot", "flash_kernel", "flash_system"]:
logging.info("This device doesn't support any flash method.")