Skip some build steps if not building system image.
tools/releasetools/add_img_to_target_files.py: This patch excludes the
inclusion of the system path into the target files if it does not exist (which
it will not if we are not building the system image).
Bug: 123430711
Test: Disable building system image, verify that target files builds without system.
Change-Id: Iaf964ede2b1df5ea4e004b572fd91187a366e75e
diff --git a/tools/releasetools/add_img_to_target_files.py b/tools/releasetools/add_img_to_target_files.py
index f545dcc..5132ae7 100755
--- a/tools/releasetools/add_img_to_target_files.py
+++ b/tools/releasetools/add_img_to_target_files.py
@@ -734,6 +734,7 @@
os.path.exists(os.path.join(OPTIONS.input_tmp,
"IMAGES",
"product_services.img")))
+ has_system = os.path.isdir(os.path.join(OPTIONS.input_tmp, "SYSTEM"))
has_system_other = os.path.isdir(os.path.join(OPTIONS.input_tmp,
"SYSTEM_OTHER"))
@@ -798,9 +799,10 @@
if output_zip:
recovery_two_step_image.AddToZip(output_zip)
- banner("system")
- partitions['system'] = AddSystem(
- output_zip, recovery_img=recovery_image, boot_img=boot_image)
+ if has_system:
+ banner("system")
+ partitions['system'] = AddSystem(
+ output_zip, recovery_img=recovery_image, boot_img=boot_image)
if has_vendor:
banner("vendor")