Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 10f88830 authored by Brint E. Kriebel's avatar Brint E. Kriebel
Browse files

Merge branch 'cm-11.0' into stable/cm-11.0

Change-Id: Ifd195ae8a0d6ab5e6408fdf48c4c097d4e09028f
parents d8515155 62776cfd
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ if sys.hexversion < 0x02040000:
  sys.exit(1)

import errno
import hashlib
import os
import re
import shutil
@@ -262,6 +263,16 @@ def AddRadio(output_zip):
        print "flash-radio.sh is empty, skipping..."
      tmp_flash_radio.close()

def AddDigest(output_zip):
  """Generate MD5 hashes of each file in the zip and store the results to the zip."""
  print "creating md5sum-fastboot.md5..."
  tmp_md5sum = tempfile.NamedTemporaryFile()
  for md5_file in output_zip.namelist():
    tmp_md5sum.write("%s  %s\n" % (hashlib.md5(output_zip.read(md5_file)).hexdigest(), md5_file))
  tmp_md5sum.flush()
  output_zip.write(tmp_md5sum.name, "md5sum-fastboot.md5")
  tmp_md5sum.close()

def main(argv):
  bootable_only = [False]

@@ -314,6 +325,9 @@ def main(argv):
    CopyInfo(output_zip)
    AddRadio(output_zip)

  # Generating the md5 hashes should always be the last step
  AddDigest(output_zip)

  print "cleaning up..."
  output_zip.close()
  shutil.rmtree(OPTIONS.input_tmp)
+1 −1
Original line number Diff line number Diff line
@@ -607,7 +607,7 @@ def GetBuildProp(prop, info_dict):
  try:
    return info_dict.get("build.prop", {})[prop]
  except KeyError:
    raise common.ExternalError("couldn't find %s in build.prop" % (property,))
    raise common.ExternalError("couldn't find %s in build.prop" % (prop,))

def AddToKnownPaths(filename, known_paths):
  if filename[-1] == "/":