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:
parent
dee8e34298
commit
faf523911a
|
@ -716,7 +716,7 @@ def install_system_image(args, size_reserve, suffix, step, steps,
|
||||||
|
|
||||||
# patch sparse image for Samsung devices if specified
|
# patch sparse image for Samsung devices if specified
|
||||||
samsungify_strategy = args.deviceinfo["flash_sparse_samsung_format"]
|
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")
|
logging.info("(native) convert sparse image into Samsung's sparse image format")
|
||||||
pmb.chroot.apk.install(args, ["sm-sparse-image-tool"])
|
pmb.chroot.apk.install(args, ["sm-sparse-image-tool"])
|
||||||
sys_image = f"{args.device}.img"
|
sys_image = f"{args.device}.img"
|
||||||
|
|
Loading…
Reference in New Issue