sm6150-common: releasetools: Add images to the output zip only if present
Change-Id: Ic5d71c3e16c443a63814dd0f17398c2ae5c8469b
This commit is contained in:
parent
2f6d32221d
commit
c5b39fc554
@ -35,7 +35,11 @@ def IncrementalOTA_InstallEnd(info):
|
|||||||
|
|
||||||
def AddImage(info, basename, dest):
|
def AddImage(info, basename, dest):
|
||||||
name = basename
|
name = basename
|
||||||
data = info.input_zip.read("IMAGES/" + basename)
|
path = "IMAGES/" + name
|
||||||
|
if path not in info.input_zip.namelist():
|
||||||
|
return
|
||||||
|
|
||||||
|
data = info.input_zip.read(path)
|
||||||
common.ZipWriteStr(info.output_zip, name, data)
|
common.ZipWriteStr(info.output_zip, name, data)
|
||||||
info.script.Print("Patching {} image unconditionally...".format(dest.split('/')[-1]))
|
info.script.Print("Patching {} image unconditionally...".format(dest.split('/')[-1]))
|
||||||
info.script.AppendExtra('package_extract_file("%s", "%s");' % (name, dest))
|
info.script.AppendExtra('package_extract_file("%s", "%s");' % (name, dest))
|
||||||
|
Loading…
Reference in New Issue
Block a user