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

Commit 521b58be authored by Scott Mertz's avatar Scott Mertz Committed by Gerrit Code Review
Browse files

Revert "tools:releasetools:Use timestamp from build.prop while building system.img"

This reverts commit 0f1ef4b3.

Change-Id: I13c84cd02b31f03ba2af48cf02ad0fc286afe40c
parent 86ea4c89
Loading
Loading
Loading
Loading
+1 −16
Original line number Diff line number Diff line
@@ -220,6 +220,7 @@ def BuildImage(in_dir, prop_dict, out_file,
  build_command = []
  fs_type = prop_dict.get("fs_type", "")
  run_fsck = False

  is_verity_partition = "verity_block_device" in prop_dict
  verity_supported = prop_dict.get("verity") == "true"
  # adjust the partition size to make room for the hashes if this is to be verified
@@ -247,22 +248,6 @@ def BuildImage(in_dir, prop_dict, out_file,
      build_command.extend(["-j", prop_dict["journal_size"]])
    if "timestamp" in prop_dict:
      build_command.extend(["-T", str(prop_dict["timestamp"])])
    else:
      #Timestamp not provided in property_dict.
      #Lets try to find the build.prop file and get the timestamp from there
      #instead
      path = in_dir + "/build.prop"
      if os.path.exists(path):
        with open(path) as f:
          lines = f.readlines()
          for line in lines:
            line = line.strip()
            if line.startswith("ro.build.date.utc"):
              name, value = line.split("=", 1)
              print "read ro.build.date.utc from build.prop as ", value
              build_command.extend(["-T", value])
      else:
        print "unable to open build.prop file..Image will be built using system time"
    if fs_config is not None:
      build_command.extend(["-C", fs_config])
    if block_list is not None: