OSDN Git Service

Merge "Make releasetools pylint clean."
authorDan Albert <danalbert@google.com>
Fri, 27 Mar 2015 18:40:02 +0000 (18:40 +0000)
committerGerrit Code Review <noreply-gerritcodereview@google.com>
Fri, 27 Mar 2015 18:40:02 +0000 (18:40 +0000)
1  2 
tools/releasetools/add_img_to_target_files.py
tools/releasetools/build_image.py

@@@ -130,25 -130,18 +130,27 @@@ def CreateImage(input_dir, info_dict, w
  
    fs_config = os.path.join(
        input_dir, "META/" + fs_config_prefix + "filesystem_config.txt")
-   if not os.path.exists(fs_config): fs_config = None
+   if not os.path.exists(fs_config):
+     fs_config = None
  
    fc_config = os.path.join(input_dir, "BOOT/RAMDISK/file_contexts")
-   if not os.path.exists(fc_config): fc_config = None
+   if not os.path.exists(fc_config):
+     fc_config = None
  
 +  # Override values loaded from info_dict.
 +  if fs_config:
 +    image_props["fs_config"] = fs_config
 +  if fc_config:
 +    image_props["selinux_fc"] = fc_config
 +  if block_list:
 +    image_props["block_list"] = block_list
 +  if image_props.get("system_root_image") == "true":
 +    image_props["ramdisk_dir"] = os.path.join(input_dir, "BOOT/RAMDISK")
 +    image_props["ramdisk_fs_config"] = os.path.join(
 +        input_dir, "META/boot_filesystem_config.txt")
 +
    succ = build_image.BuildImage(os.path.join(input_dir, what),
 -                                image_props, img,
 -                                fs_config=fs_config,
 -                                fc_config=fc_config,
 -                                block_list=block_list)
 +                                image_props, img)
    assert succ, "build " + what + ".img image failed"
  
    return img
Simple merge