summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2009-06-23 16:27:38 -0700
committerDoug Zongker <dougz@android.com>2009-06-23 16:29:13 -0700
commit9fc74c7823182c4121f32114a7f83ae3fa7e4346 (patch)
treecf99f8fcfb2a55ebd2b96ae683c39b0b8c2c963d /tools
parentedb6829f832bb79ba2e96ada74b3b971b73ad9a7 (diff)
downloadbuild-9fc74c7823182c4121f32114a7f83ae3fa7e4346.zip
build-9fc74c7823182c4121f32114a7f83ae3fa7e4346.tar.gz
build-9fc74c7823182c4121f32114a7f83ae3fa7e4346.tar.bz2
don't fail if no required bootloaders are defined
Generic targets don't have a list of defined bootloaders. Instead of failing to build an OTA package, just omit the constraint. Fix bad references to ExternalError.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/releasetools/ota_from_target_files12
1 files changed, 5 insertions, 7 deletions
diff --git a/tools/releasetools/ota_from_target_files b/tools/releasetools/ota_from_target_files
index 1a6ebbf..73eccd4 100755
--- a/tools/releasetools/ota_from_target_files
+++ b/tools/releasetools/ota_from_target_files
@@ -288,11 +288,9 @@ def AppendAssertions(script, input_zip):
info = input_zip.read("OTA/android-info.txt")
m = re.search(r"require\s+version-bootloader\s*=\s*(\S+)", info)
- if not m:
- raise ExternalError("failed to find required bootloaders in "
- "android-info.txt")
- bootloaders = m.group(1).split("|")
- script.AssertSomeBootloader(*bootloaders)
+ if m:
+ bootloaders = m.group(1).split("|")
+ script.AssertSomeBootloader(*bootloaders)
def WriteFullOTAPackage(input_zip, output_zip):
@@ -415,7 +413,7 @@ def GetBuildProp(property, z):
return bp
m = re.search(re.escape(property) + r"=(.*)\n", bp)
if not m:
- raise ExternalException("couldn't find %s in build.prop" % (property,))
+ raise common.ExternalError("couldn't find %s in build.prop" % (property,))
return m.group(1).strip()
@@ -467,7 +465,7 @@ def WriteIncrementalOTAPackage(target_zip, source_zip, output_zip):
if sf is None or fn in OPTIONS.require_verbatim:
# This file should be included verbatim
if fn in OPTIONS.prohibit_verbatim:
- raise ExternalError("\"%s\" must be sent verbatim" % (fn,))
+ raise common.ExternalError("\"%s\" must be sent verbatim" % (fn,))
print "send", fn, "verbatim"
tf.AddToZip(output_zip)
verbatim_targets.append((fn, tf.size))