Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NOT MERGE] use a dynamic timestamp #1281

Open
wants to merge 1 commit into
base: celadon/r/mr0/stable
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions aosp_diff/caas/build/make/0001-use-a-dynamic-timestamp.patch
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

Loading