diff options
author | Dario Freni <dariofreni@google.com> | 2020-01-07 15:48:04 +0000 |
---|---|---|
committer | Dario Freni <dariofreni@google.com> | 2020-01-07 15:50:36 +0000 |
commit | 29f6e45d6760bd4a6aa0b98f1f76a3d3397f4339 (patch) | |
tree | 0169720c85532ee7949028efb2c8b478b9d4e4e9 /apexer/apexer.py | |
parent | 2bcc3718f3bc784d858f33e4909e92efd0930026 (diff) |
Exclude cmd line from build info.
The command line file in build_info pb causes some non-determinism in
the output (e.g. if directories are named differently). Removing this
by default since it has mostly debugging uses.
Test: m com.android.tzdata; inspect output.
Change-Id: I168b7ffba66657b8c60396e7c3c3f132f8cb1f23
Diffstat (limited to 'apexer/apexer.py')
-rw-r--r-- | apexer/apexer.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/apexer/apexer.py b/apexer/apexer.py index 892527f..cbb5a49 100644 --- a/apexer/apexer.py +++ b/apexer/apexer.py @@ -125,6 +125,12 @@ def ParseArgs(argv): action='store_true', help='Include build information file in the resulting apex.') parser.add_argument( + '--include_cmd_line_in_build_info', + required=False, + action='store_true', + help='Include the command line in the build information file in the resulting apex. ' + 'Note that this makes it harder to make deterministic builds.') + parser.add_argument( '--build_info', required=False, help='Build information file to be used for default values.') @@ -280,7 +286,8 @@ def ValidateArgs(args): def GenerateBuildInfo(args): build_info = apex_build_info_pb2.ApexBuildInfo() - build_info.apexer_command_line = str(sys.argv) + if (args.include_cmd_line_in_build_info): + build_info.apexer_command_line = str(sys.argv) with open(args.file_contexts) as f: build_info.file_contexts = f.read() |