Reland "Only assert-max-image-size for static partitions."

This reverts commit 6e099095d1.

Reason for revert: reland the CL

Bug: 122377935
Test: build blueline_mainline

Change-Id: Iee594b64e687decff186c0fa60f82b88608febe9
This commit is contained in:
Yifan Hong
2019-04-09 17:03:57 +00:00
parent d7d6e9d671
commit 8c3dce0c56
3 changed files with 21 additions and 48 deletions

View File

@@ -18,10 +18,8 @@
Builds output_image from the given input_directory, properties_file,
and writes the image to target_output_directory.
If argument generated_prop_file exists, write additional properties to the file.
Usage: build_image.py input_directory properties_file output_image \\
target_output_directory [generated_prop_file]
target_output_directory
"""
from __future__ import print_function
@@ -735,13 +733,8 @@ def GlobalDictFromImageProp(image_prop, mount_point):
return d
def SaveGlobalDict(filename, glob_dict):
with open(filename, "w") as f:
f.writelines(["%s=%s" % (key, value) for (key, value) in glob_dict.items()])
def main(argv):
if len(argv) < 4 or len(argv) > 5:
if len(argv) != 4:
print(__doc__)
sys.exit(1)
@@ -751,7 +744,6 @@ def main(argv):
glob_dict_file = argv[1]
out_file = argv[2]
target_out = argv[3]
prop_file_out = argv[4] if len(argv) >= 5 else None
glob_dict = LoadGlobalDict(glob_dict_file)
if "mount_point" in glob_dict:
@@ -791,10 +783,6 @@ def main(argv):
logger.error("Failed to build %s from %s", out_file, in_dir)
raise
if prop_file_out:
glob_dict_out = GlobalDictFromImageProp(image_properties, mount_point)
SaveGlobalDict(prop_file_out, glob_dict_out)
if __name__ == '__main__':
try: