cros_bundle_firmware: fix debug output problem
Verbose log output generated by cros-{bundle,write}-firmware utilities
does not include commands invoked through cros_build_lib.RunComand()
anymore - this method now prints into a log sent into /dev/null by
default, and reconfiguring log destination would be a non-trivial
change, requiring a much tighter integration with the chromite
library.
Let's just print the command ourselves when required, as the rest of
debug printouts in these utilities.
Also added a comment in the ReadFileAndConca() docstring to pacify the
pre-upload check.
BUG=none
TEST=manual
verified that log generated with -v=4 includes the list of commands
executed by tools.Tools.Run()
Change-Id: I818f04dd659c820bbe78539ed46859c9b813edd8
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/208143
Reviewed-by: Simon Glass <sjg@chromium.org>
diff --git a/host/lib/tools.py b/host/lib/tools.py
index ff11c36..f564a6b 100755
--- a/host/lib/tools.py
+++ b/host/lib/tools.py
@@ -199,8 +199,9 @@
if sudo and os.getuid():
cmd.insert(0, 'sudo')
try:
+ self._out.Debug('will run: "%s"' % ' '.join(cmd))
result = cros_build_lib.RunCommand(
- cmd, cwd=cwd, print_cmd=self._out.verbose > 3, capture_output=True,
+ cmd, cwd=cwd, capture_output=True,
combine_stdout_stderr=True, error_code_ok=True)
except cros_build_lib.RunCommandError as ex:
raise CmdError(str(ex))
@@ -244,6 +245,8 @@
Args:
filenames: a list containing name of the files to read.
+ compress: a string, the name of the compression method, if any, to apply
+ to the files. The only supported method is 'lzo'
with_index: If true, an index structure is prepended to the data.
Returns: