mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 02:31:29 +00:00
Add dump_file_list flag to package_from_installed.py
To aid in debugging packaging file list, add a dump_file_list flag which writes the list to a file of the user's choosing. Format of the file is "disk_name -> archive_name" Change-Id: Ib0549372fa72069a58d46ef32807e7e7cc713092 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6701090 Reviewed-by: Devon Loehr <dloehr@google.com> Reviewed-by: Brian Ryner <bryner@google.com> Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com> Auto-Submit: Rafael Cintron <rafael.cintron@microsoft.com>
This commit is contained in:
@@ -538,6 +538,12 @@ def main():
|
||||
default=False,
|
||||
dest='allow_multiple_vs_installs',
|
||||
help='Specify if multiple VS installs are allowed.')
|
||||
parser.add_option('--dump_file_list',
|
||||
action='store',
|
||||
type='string',
|
||||
dest='dump_file_list',
|
||||
default='',
|
||||
help='Specify a file to dump the ZIP file\'s file list.')
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
if options.repackage_dir:
|
||||
@@ -578,9 +584,14 @@ def main():
|
||||
|
||||
AddEnvSetup(files, options.arm)
|
||||
|
||||
if False:
|
||||
for f in files:
|
||||
print(f[0], '->', f[1])
|
||||
# Dump file list if requested
|
||||
if options.dump_file_list:
|
||||
print('Dumping file list to %s...' % options.dump_file_list)
|
||||
with open(options.dump_file_list, 'wt', newline='',
|
||||
encoding='utf-8') as f:
|
||||
for disk_name, archive_name in files:
|
||||
f.write('%s -> %s\n' % (disk_name, archive_name))
|
||||
print('File list dumped successfully.')
|
||||
return 0
|
||||
|
||||
output = 'out.zip'
|
||||
|
||||
Reference in New Issue
Block a user