From 28a0ee3240e635b1e0813fe9f08a89d1b2e88515 Mon Sep 17 00:00:00 2001 From: Gurpreet Singh Date: Fri, 21 Oct 2022 11:13:29 +0000 Subject: [PATCH] Revert "Use fixed timestamps before performing api diff operation." This reverts commit a772ee4cb187e1ddad9bd57a19cf5a82167b73b4. Reason for revert: The timestamps can be completely avoid by using labels instead. Change-Id: If72a9e8aba6209ebe81d11cae1ed6defb43d6079 --- build/mainline_modules_sdks.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/build/mainline_modules_sdks.py b/build/mainline_modules_sdks.py index c1eb02d..7c9b853 100755 --- a/build/mainline_modules_sdks.py +++ b/build/mainline_modules_sdks.py @@ -303,11 +303,6 @@ def set_default_timestamp(base_dir, paths): p = os.path.join(base_dir, path) os.utime(p, (timestamp, timestamp)) -# set the timestamp of the file path to default_zip_time. -def set_default_timestamp_to_file(file_path): - timestamp = default_zip_time.timestamp() - os.utime(file_path, (timestamp, timestamp)) - @dataclasses.dataclass() class SnapshotBuilder: @@ -541,8 +536,6 @@ java_sdk_library_import {{ with zipfile.ZipFile(sdk_zip_file, "r") as zipObj: extracted_current_api = zipObj.extract( member=current_api, path=snapshots_dir) - set_default_timestamp_to_file(extracted_current_api) - set_default_timestamp_to_file(latest_api) # The diff tool has an exit code of 0, 1 or 2 depending on whether # it find no differences, some differences or an error (like missing # file). As 0 or 1 are both valid results this cannot use check=True