summaryrefslogtreecommitdiffstats
path: root/tools/releasetools/common.py
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2011-03-03 21:52:08 -0800
committerYing Wang <wangying@google.com>2011-03-04 14:42:13 -0800
commita73b6561cee39ad416f4af327dbe72ec565d2423 (patch)
tree8bccd02c62494fb943067c2ae01ad54ab317fa2f /tools/releasetools/common.py
parenta34fa95c164a9388ed0b84b17a63241bffd4132a (diff)
downloadbuild-a73b6561cee39ad416f4af327dbe72ec565d2423.zip
build-a73b6561cee39ad416f4af327dbe72ec565d2423.tar.gz
build-a73b6561cee39ad416f4af327dbe72ec565d2423.tar.bz2
Drop support for target files with no recovery.fstab.
Change-Id: I099298cfffc2546975732a3bf0df60f96ccbdac4 Meanwhile don't build the ota and update zip files if no recovery.fstab found.
Diffstat (limited to 'tools/releasetools/common.py')
-rw-r--r--tools/releasetools/common.py18
1 files changed, 2 insertions, 16 deletions
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index a236a12..74192f7 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -121,10 +121,6 @@ def LoadInfoDict(zip):
makeint("boot_size")
d["fstab"] = LoadRecoveryFSTab(zip)
- if not d["fstab"]:
- if "fs_type" not in d: d["fs_type"] = "yaffs2"
- if "partition_type" not in d: d["partition_type"] = "MTD"
-
return d
def LoadRecoveryFSTab(zip):
@@ -134,9 +130,7 @@ def LoadRecoveryFSTab(zip):
try:
data = zip.read("RECOVERY/RAMDISK/etc/recovery.fstab")
except KeyError:
- # older target-files that doesn't have a recovery.fstab; fall back
- # to the fs_type and partition_type keys.
- return
+ raise ValueError("Could not find RECOVERY/RAMDISK/etc/recovery.fstab")
d = {}
for line in data.split("\n"):
@@ -350,9 +344,6 @@ def CheckSize(data, target, info_dict):
p = info_dict["fstab"][mount_point]
fs_type = p.fs_type
limit = info_dict.get(p.device + "_size", None)
- else:
- fs_type = info_dict.get("fs_type", None)
- limit = info_dict.get(target + "_size", None)
if not fs_type or not limit: return
if fs_type == "yaffs2":
@@ -777,9 +768,4 @@ def GetTypeAndDevice(mount_point, info):
if fstab:
return PARTITION_TYPES[fstab[mount_point].fs_type], fstab[mount_point].device
else:
- devices = {"/boot": "boot",
- "/recovery": "recovery",
- "/radio": "radio",
- "/data": "userdata",
- "/cache": "cache"}
- return info["partition_type"], info.get("partition_path", "") + devices[mount_point]
+ return None