Commit 21de33a9 authored by Bruce Dawson's avatar Bruce Dawson Committed by LUCI CQ

Print packaging file size/count stats always

When doing a dry run of packaging the toolchain we have always printed
stats on the size and number of files. It is odd and annoying that we
don't print those stats when doing the actual packaging, so this changes
that.

Change-Id: Ic60c3f4960dacaea39c048dc0c5f4c50b551f68a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2380231Reviewed-by: 's avatarMirko Bonadei <mbonadei@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
parent 336f984f
......@@ -508,17 +508,16 @@ def main():
if not options.repackage_dir and disk_name.count(WIN_VERSION) > 0:
version_match_count += 1
if os.path.exists(disk_name):
if options.dryrun:
total_size += os.path.getsize(disk_name)
else:
total_size += os.path.getsize(disk_name)
if not options.dryrun:
zf.write(disk_name, archive_name)
else:
missing_files = True
sys.stdout.write('\r%s does not exist.\n\n' % disk_name)
sys.stdout.flush()
sys.stdout.write('\r%1.3f GB of data in %d files, %d files for %s.%s\n' %
(total_size / 1e9, count, version_match_count, WIN_VERSION, ' '*50))
if options.dryrun:
sys.stdout.write('\r%1.3f GB of data in %d files, %d files for %s.%s\n' %
(total_size / 1e9, count, version_match_count, WIN_VERSION, ' '*50))
return 0
if missing_files:
raise Exception('One or more files were missing - aborting')
......
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