-
Notifications
You must be signed in to change notification settings - Fork 249
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: jialei.feng <jialei@otc-aes-1604>
- Loading branch information
1 parent
e9a1f71
commit 56c043a
Showing
1 changed file
with
65 additions
and
0 deletions.
There are no files selected for viewing
65 changes: 65 additions & 0 deletions
65
aosp_diff/caas/build/make/0001-use-a-dynamic-timestamp.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
From 20dd4a9b4c0fb0b18f0659a7bcc2e996699ecf51 Mon Sep 17 00:00:00 2001 | ||
From: "jialei.feng" <jialei@otc-aes-1604> | ||
Date: Tue, 13 Oct 2020 10:00:34 +0800 | ||
Subject: [PATCH] use a dynamic timestamp | ||
|
||
Signed-off-by: jialei.feng <jialei@otc-aes-1604> | ||
--- | ||
tools/releasetools/add_img_to_target_files.py | 13 ------------- | ||
1 file changed, 13 deletions(-) | ||
|
||
diff --git a/tools/releasetools/add_img_to_target_files.py b/tools/releasetools/add_img_to_target_files.py | ||
index eb041ecea..f85c9dfb3 100644 | ||
--- a/tools/releasetools/add_img_to_target_files.py | ||
+++ b/tools/releasetools/add_img_to_target_files.py | ||
@@ -46,7 +46,6 @@ Usage: add_img_to_target_files [flag] target_files | ||
|
||
from __future__ import print_function | ||
|
||
-import datetime | ||
import logging | ||
import os | ||
import shlex | ||
@@ -76,13 +75,6 @@ OPTIONS.replace_verity_public_key = False | ||
OPTIONS.replace_verity_private_key = False | ||
OPTIONS.is_signing = False | ||
|
||
-# Use a fixed timestamp (01/01/2009 00:00:00 UTC) for files when packaging | ||
-# images. (b/24377993, b/80600931) | ||
-FIXED_FILE_TIMESTAMP = int(( | ||
- datetime.datetime(2009, 1, 1, 0, 0, 0, 0, None) - | ||
- datetime.datetime.utcfromtimestamp(0)).total_seconds()) | ||
- | ||
- | ||
class OutputFile(object): | ||
"""A helper class to write a generated file to the given dir or zip. | ||
|
||
@@ -399,7 +391,6 @@ def CreateImage(input_dir, info_dict, what, output_file, block_list=None): | ||
logger.info("creating %s.img...", what) | ||
|
||
image_props = build_image.ImagePropFromGlobalDict(info_dict, what) | ||
- image_props["timestamp"] = FIXED_FILE_TIMESTAMP | ||
|
||
if what == "system": | ||
fs_config_prefix = "" | ||
@@ -471,8 +462,6 @@ def AddUserdata(output_zip): | ||
|
||
logger.info("creating userdata.img...") | ||
|
||
- image_props["timestamp"] = FIXED_FILE_TIMESTAMP | ||
- | ||
if OPTIONS.info_dict.get("userdata_img_with_data") == "true": | ||
user_dir = os.path.join(OPTIONS.input_tmp, "DATA") | ||
else: | ||
@@ -562,8 +551,6 @@ def AddCache(output_zip): | ||
|
||
logger.info("creating cache.img...") | ||
|
||
- image_props["timestamp"] = FIXED_FILE_TIMESTAMP | ||
- | ||
user_dir = common.MakeTempDir() | ||
build_image.BuildImage(user_dir, image_props, img.name) | ||
|
||
-- | ||
2.17.1 | ||
|