forked from openkylin/platform_build
fix timestamps in images to the build date
Pass the -T option to mkuserimg.sh to set all timestamps in the system image (and any other ext4 image we build) to the value of ro.build.date.utc for the build. This makes images produced from a given target_files bit-identical. Change-Id: Ibba5fa7a610f476209ef61708729cfd79dece0b6
This commit is contained in:
parent
b00398a07e
commit
850b80780d
|
@ -232,8 +232,9 @@ def BuildImage(in_dir, prop_dict, out_file):
|
|||
run_fsck = True
|
||||
build_command.extend([in_dir, out_file, fs_type,
|
||||
prop_dict["mount_point"]])
|
||||
if "partition_size" in prop_dict:
|
||||
build_command.append(prop_dict["partition_size"])
|
||||
build_command.append(prop_dict["partition_size"])
|
||||
if "timestamp" in prop_dict:
|
||||
build_command.extend(["-T", str(prop_dict["timestamp"])])
|
||||
if "selinux_fc" in prop_dict:
|
||||
build_command.append(prop_dict["selinux_fc"])
|
||||
else:
|
||||
|
@ -276,7 +277,7 @@ def ImagePropFromGlobalDict(glob_dict, mount_point):
|
|||
glob_dict: the global dictionary from the build system.
|
||||
mount_point: such as "system", "data" etc.
|
||||
"""
|
||||
d = {}
|
||||
d = {"timestamp": glob_dict["build.prop"].get("ro.build.date.utc", -1)}
|
||||
|
||||
def copy_prop(src_p, dest_p):
|
||||
if src_p in glob_dict:
|
||||
|
|
Loading…
Reference in New Issue