1
0
Fork 1
mirror of https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git synced 2025-07-23 20:45:08 +03:00

install: rename --sdcard arg to --disk

Rename the argument, because any block device can be passed to the
argument. Use "disk", because the other short word "device" usually
means the target device/phone to install.

Keep --sdcard as alias for compatibility with existing scripts and
muscle memory.

Reviewed-by: Clayton Craft <clayton@craftyguy.net>
Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20231119182302.2415-1-ollieparanoid@postmarketos.org%3E
This commit is contained in:
Oliver Smith 2023-11-19 19:22:50 +01:00
parent 942ee20789
commit ef047137d0
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
8 changed files with 58 additions and 56 deletions

View file

@ -238,12 +238,12 @@ def install(args):
if args.rsync and args.full_disk_encryption:
raise ValueError("Installation using rsync is not compatible with full"
" disk encryption.")
if args.rsync and not args.sdcard:
raise ValueError("Installation using rsync only works on sdcard.")
if args.rsync and not args.disk:
raise ValueError("Installation using rsync only works with --disk.")
# On-device installer checks
# Note that this can't be in the mutually exclusive group that has most of
# the conflicting options, because then it would not work with --sdcard.
# the conflicting options, because then it would not work with --disk.
if args.on_device_installer:
if args.full_disk_encryption:
raise ValueError("--on-device-installer cannot be combined with"
@ -287,7 +287,7 @@ def install(args):
" installer.")
args.user = "user"
if not args.sdcard and args.split is None:
if not args.disk and args.split is None:
# Default to split if the flash method requires it
flasher = pmb.config.flashers.get(args.deviceinfo["flash_method"], {})
if flasher.get("split", False):