pmb.install: Add pmbootstrap install --(no-)sparse option (!1862)

At the moment, sparse images are generated if the device sets
deviceinfo_flash_sparse="true". But for testing purposes it can be
useful to specifically enable or disable the default behavior.

Add a --sparse and --no-sparse option that enables or disables
sparse image generation.
This commit is contained in:
Minecrell 2020-01-22 18:48:45 +01:00 committed by Oliver Smith
parent 4352096783
commit c8737740b1
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
2 changed files with 12 additions and 1 deletions

View file

@ -488,6 +488,13 @@ def arguments():
install.add_argument("--no-base",
help="do not install postmarketos-base (advanced)",
action="store_false", dest="install_base")
group = install.add_mutually_exclusive_group()
group.add_argument("--sparse", help="generate sparse image file"
" (even if unsupported by device)", default=None,
action="store_true")
group.add_argument("--no-sparse", help="do not generate sparse image file"
" (even if supported by device)", dest="sparse",
action="store_false")
# Action: checksum / aportgen / build
checksum = sub.add_parser("checksum", help="update aport checksums")