pmb.install._install: add option to not generate the image (MR 1914)

This commit is contained in:
Daniele Debernardi 2020-04-12 21:40:20 +02:00 committed by Alexey Min
parent add39d1a57
commit 34c6f88691
No known key found for this signature in database
GPG key ID: 0B19D2A65870B448
2 changed files with 9 additions and 2 deletions

View file

@ -489,7 +489,12 @@ def install(args):
sanity_check_sdcard(args.sdcard) sanity_check_sdcard(args.sdcard)
# Number of steps for the different installation methods. # Number of steps for the different installation methods.
steps = 4 if args.android_recovery_zip else 5 if args.no_image:
steps = 2
elif args.android_recovery_zip:
steps = 4
else:
steps = 5
# Install required programs in native chroot # Install required programs in native chroot
logging.info("*** (1/{}) PREPARE NATIVE CHROOT ***".format(steps)) logging.info("*** (1/{}) PREPARE NATIVE CHROOT ***".format(steps))
@ -547,5 +552,5 @@ def install(args):
if args.android_recovery_zip: if args.android_recovery_zip:
install_recovery_zip(args) install_recovery_zip(args)
else: elif not args.no_image:
install_system_image(args) install_system_image(args)

View file

@ -512,6 +512,8 @@ def arguments():
group.add_argument("--android-recovery-zip", group.add_argument("--android-recovery-zip",
help="generate TWRP flashable zip", help="generate TWRP flashable zip",
action="store_true", dest="android_recovery_zip") action="store_true", dest="android_recovery_zip")
group.add_argument("--no-image", help="do not generate the image",
action="store_true", dest="no_image")
install.add_argument("--rsync", help="update the sdcard using rsync," install.add_argument("--rsync", help="update the sdcard using rsync,"
" does not work with --fde", action="store_true") " does not work with --fde", action="store_true")
install.add_argument("--cipher", help="cryptsetup cipher used to" install.add_argument("--cipher", help="cryptsetup cipher used to"