OSDN Git Service

am ddc85a1c: am d7321d31: Skip userdata.img only if partition size is not give for...
authorYing Wang <wangying@google.com>
Fri, 15 Mar 2013 17:38:56 +0000 (17:38 +0000)
committerAndroid Git Automerger <android-git-automerger@android.com>
Fri, 15 Mar 2013 17:38:56 +0000 (17:38 +0000)
* commit 'ddc85a1cfbcc3003560c010ab69fa29d3e83b8c5':
  Skip userdata.img only if partition size is not give for extfs.

core/Makefile
tools/releasetools/img_from_target_files

index 38f5aa8..47cb114 100644 (file)
@@ -931,7 +931,15 @@ INTERNAL_USERDATAIMAGE_FILES += \
     $(filter $(TARGET_OUT_DATA)/%,$(tests_MODULES))
 endif
 
-ifdef BOARD_USERDATAIMAGE_PARTITION_SIZE
+# Don't build userdata.img if it's extfs but no partition size
+skip_userdata.img :=
+ifdef INTERNAL_USERIMAGES_EXT_VARIANT
+ifndef BOARD_USERDATAIMAGE_PARTITION_SIZE
+skip_userdata.img := true
+endif
+endif
+
+ifneq ($(skip_userdata.img),true)
 userdataimage_intermediates := \
     $(call intermediates-dir-for,PACKAGING,userdata)
 BUILT_USERDATAIMAGE_TARGET := $(PRODUCT_OUT)/userdata.img
@@ -957,7 +965,8 @@ $(INSTALLED_USERDATAIMAGE_TARGET): $(INTERNAL_USERIMAGES_DEPS) \
 userdataimage-nodeps: | $(INTERNAL_USERIMAGES_DEPS)
        $(build-userdataimage-target)
 
-endif # BOARD_USERDATAIMAGE_PARTITION_SIZE is set
+endif # not skip_userdata.img
+skip_userdata.img :=
 
 #######
 ## data partition tarball
index 3a52342..007a3f7 100755 (executable)
@@ -57,8 +57,9 @@ def AddUserdata(output_zip):
 
   image_props = build_image.ImagePropFromGlobalDict(OPTIONS.info_dict,
                                                     "data")
-  # If no userdata_size is provided, skip userdata.img.
-  if not image_props.get("partition_size"):
+  # If no userdata_size is provided for extfs, skip userdata.img.
+  if (image_props.get("fs_type", "").startswith("ext") and
+      not image_props.get("partition_size")):
     return
 
   print "creating userdata.img..."