cros_build_lib.py: remove RuncommandCaptureOutput and RunCommandQuietly
RunCommandCaptureOutput is a wrapper of RunCommand. In multiple
places, we have a layer to decide whether to call RunCommand or
RunCommandCaptureOutput. There is no reason to have callers adding
logic to decide this. Move the logic into RunCommand by adding a
keyword argument 'capture_output'.
Also replace RunCommandQuietly by using keyword 'quiet'.
BUG=chromium:339596
CQ-DEPEND=CL:184474
CQ-DEPEND=CL:184478
TEST=`buildbot/run_tests`
TEST=trybot runs
Change-Id: Id6561467c868b9ecbbfa2d111ceb6b00999d68b2
Reviewed-on: https://chromium-review.googlesource.com/184448
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Yu-Ju Hong <yjhong@chromium.org>
Commit-Queue: Yu-Ju Hong <yjhong@chromium.org>
diff --git a/scripts/cros_generate_sysroot.py b/scripts/cros_generate_sysroot.py
index a1e8cad..07b764d 100644
--- a/scripts/cros_generate_sysroot.py
+++ b/scripts/cros_generate_sysroot.py
@@ -79,8 +79,8 @@
# Calculate buildtime deps that are not runtime deps.
raw_sysroot = cros_build_lib.GetSysroot(board=self.options.board)
cmd = ['qdepends', '-q', '-C', self.options.package]
- output = cros_build_lib.RunCommandCaptureOutput(
- cmd, extra_env={'ROOT': raw_sysroot}).output
+ output = cros_build_lib.RunCommand(
+ cmd, extra_env={'ROOT': raw_sysroot}, capture_output=True).output
if output.count('\n') > 1:
raise AssertionError('Too many packages matched given package pattern')