diff options
author | Doug Zongker <dougz@android.com> | 2010-09-17 07:48:28 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-09-17 07:48:28 -0700 |
commit | 25df2a980d87f011fe702b6209c3b71b2824fc18 (patch) | |
tree | ce432df6dba7afa612268771b45f3b92f80ee660 | |
parent | cec75adb645fdd7535370bbb996039b2a3f3d0b7 (diff) | |
parent | 6be030af2907cfbbfe59bd207e07f09c45ec4588 (diff) | |
download | build-25df2a980d87f011fe702b6209c3b71b2824fc18.zip build-25df2a980d87f011fe702b6209c3b71b2824fc18.tar.gz build-25df2a980d87f011fe702b6209c3b71b2824fc18.tar.bz2 |
am 6be030af: Merge "remove remaining refs to max_image_sizes" into gingerbread
Merge commit '6be030af2907cfbbfe59bd207e07f09c45ec4588' into gingerbread-plus-aosp
* commit '6be030af2907cfbbfe59bd207e07f09c45ec4588':
remove remaining refs to max_image_sizes
-rw-r--r-- | tools/releasetools/common.py | 7 | ||||
-rwxr-xr-x | tools/releasetools/img_from_target_files | 8 |
2 files changed, 8 insertions, 7 deletions
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py index 3ec4c2d..31e86a1 100644 --- a/tools/releasetools/common.py +++ b/tools/releasetools/common.py @@ -35,7 +35,6 @@ if not hasattr(os, "SEEK_SET"): class Options(object): pass OPTIONS = Options() OPTIONS.search_path = "out/host/linux-x86" -OPTIONS.max_image_size = {} OPTIONS.verbose = False OPTIONS.tempfiles = [] OPTIONS.device_specific = None @@ -104,7 +103,8 @@ def LoadInfoDict(zip): data = zip.read("META/imagesizes.txt") for line in data.split("\n"): if not line: continue - name, value = line.strip().split(None, 1) + name, value = line.split(" ", 1) + if not value: continue if name == "blocksize": d[name] = value else: @@ -311,7 +311,8 @@ def CheckSize(data, target, info_dict): fs_type = info_dict.get("fs_type", None) if not fs_type: return - limit = OPTIONS.max_image_size.get(target, None) + if target.endswith(".img"): target = target[:-4] + limit = info_dict.get(target + "_size", None) if limit is None: return if fs_type == "yaffs2": diff --git a/tools/releasetools/img_from_target_files b/tools/releasetools/img_from_target_files index 8250b0e..d734ad0 100755 --- a/tools/releasetools/img_from_target_files +++ b/tools/releasetools/img_from_target_files @@ -64,8 +64,8 @@ def AddUserdata(output_zip): if OPTIONS.info_dict.get("fs_type", "").startswith("ext"): build_command = ["mkuserimg.sh", user_dir, img.name, OPTIONS.info_dict["fs_type"], "userdata"] - if "userdata.img" in OPTIONS.max_image_size: - build_command.append(str(OPTIONS.max_image_size["userdata.img"])) + if "userdata_size" in OPTIONS.info_dict: + build_command.append(str(OPTIONS.info_dict["userdata_size"])) else: build_command = ["mkyaffs2image", "-f"] extra = OPTIONS.info_dict.get("mkyaffs2_extra_flags", None) @@ -112,8 +112,8 @@ def AddSystem(output_zip): build_command = ["mkuserimg.sh", os.path.join(OPTIONS.input_tmp, "system"), img.name, OPTIONS.info_dict["fs_type"], "system"] - if "system.img" in OPTIONS.max_image_size: - build_command.append(str(OPTIONS.max_image_size["system.img"])) + if "system_img" in OPTIONS.info_dict: + build_command.append(str(OPTIONS.info_dict["system_size"])) else: build_command = ["mkyaffs2image", "-f"] extra = OPTIONS.info_dict.get("mkyaffs2_extra_flags", None) |