Change ExtractTarball to use existing compression helpers.
This has the side-effect of enabling parallel decompression in some
cases.
This reduces the runtime of cros flash by 70 seconds on my machine.
BUG=chromium:1141320
TEST=cros flash
TEST=./chromite/run_pytest
Change-Id: I19d8dff5bdc0c312692c912ce6e0141f680c4f2e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/2491620
Commit-Queue: Eliot Courtney <edcourtney@chromium.org>
Tested-by: Eliot Courtney <edcourtney@chromium.org>
Reviewed-by: Stephane Belmon <sbelmon@google.com>
diff --git a/scripts/cros_generate_sysroot.py b/scripts/cros_generate_sysroot.py
index 8fc4530..14c8d08 100644
--- a/scripts/cros_generate_sysroot.py
+++ b/scripts/cros_generate_sysroot.py
@@ -105,8 +105,8 @@
self._Emerge(*packages)
def _CreateTarball(self):
- target = os.path.join(self.options.out_dir, self.options.out_file)
- cros_build_lib.CreateTarball(target, self.sysroot, sudo=True)
+ tarball_path = os.path.join(self.options.out_dir, self.options.out_file)
+ cros_build_lib.CreateTarball(tarball_path, self.sysroot, sudo=True)
def Perform(self):
"""Generate the sysroot."""