Commit a9ba11e7 authored by Samuel Huang's avatar Samuel Huang Committed by Commit Bot

[Build] aar.py: Temporarily weaken --assert-file-info check.

With the addition of ToGNString(pretty=True) (crrev.com/c/2231505),
.info files can be pretty printed. Since .info files are committed into
 upstream and downstream repos, so we'll need to regenerate these files,
and commit them (with multiple CLs).

However, during Android Chrome build aar.py is called with the flag
--assert-file-info to ensure .aar files are consistent with existing
.info files,  by regenerating .info data, followed by direct string
comparisons.

To facilitate migration, this CL weakens --assert-file-info by removing
all whitespaces before comparison. This is temporary; the CL will be
reverted once migration completes.

Bug: 1074446
Change-Id: I1633410267190a5c59b72bd52f58c86e6210463f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2235973Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Commit-Queue: Samuel Huang <huangs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#776088}
parent 78a5105f
......@@ -154,7 +154,10 @@ def main():
if args.command == 'extract':
if args.assert_info_file:
cached_info = args.assert_info_file.read()
if formatted_info != cached_info:
# Relax comparisons by indiscriminately removing whitespaces. This reduces
# noise during migration to pretty-print.
# TODO(huangs): Return to direct comparison once migration is complete.
if ''.join(formatted_info.split()) != ''.join(cached_info.split()):
raise Exception('android_aar_prebuilt() cached .info file is '
'out-of-date. Run gn gen with '
'update_android_aar_prebuilts=true to update it.')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment