pmb.install: Treat empty "flash_sparse_samsung_format" as disabled (MR 2180)

Deviceinfo variables are empty strings by default if they are unset
in the deviceinfo file, so the "is not None" check currently enables
the sm_sparse_image_tool for all existing devices using sparse format.

Simplify the check to convert the string to a bool. Empty strings
evaluate to False so this should work as originally intended.
This commit is contained in:
Minecrell 2022-04-13 20:40:06 +02:00 committed by Newbyte
parent dee8e34298
commit faf523911a
No known key found for this signature in database
GPG Key ID: 5873C171C9429CFA
1 changed files with 1 additions and 1 deletions

View File

@ -716,7 +716,7 @@ def install_system_image(args, size_reserve, suffix, step, steps,
# patch sparse image for Samsung devices if specified
samsungify_strategy = args.deviceinfo["flash_sparse_samsung_format"]
if samsungify_strategy is not None:
if samsungify_strategy:
logging.info("(native) convert sparse image into Samsung's sparse image format")
pmb.chroot.apk.install(args, ["sm-sparse-image-tool"])
sys_image = f"{args.device}.img"