aboutsummaryrefslogtreecommitdiff
path: root/llvm_tools
diff options
context:
space:
mode:
authorZhizhou Yang <zhizhouy@google.com>2019-07-19 16:39:54 -0700
committerSalud Lemus <saludlemus@google.com>2019-07-22 15:28:49 +0000
commit0e39ab73c1b0a944f08313c2c0667419843d5b7b (patch)
treefe9c8c1e53fd26e687c00223644a72968d56f37b /llvm_tools
parentb27c8f27362dca908c880adb45fb1ec537064b9c (diff)
downloadtoolchain-utils-0e39ab73c1b0a944f08313c2c0667419843d5b7b.tar.gz
toolchain-utils/llvm_tools: fix a bug overwriting chroot path
In the original code, the chroot_path will be overwriten by stdout, and if there are multiple entries in package_list, the second run will fail because chromeos_root is not correct. TEST=Tested with ./$SCRIPT --update_packages sys-devel/llvm sys-libs/compiler-rt BUG=None Change-Id: I2a9b924ed44f648bc5a27e8633fcf1e9c43819d9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1711160 Tested-by: Zhizhou Yang <zhizhouy@google.com> Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org> Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Auto-Submit: Zhizhou Yang <zhizhouy@google.com> Commit-Queue: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Diffstat (limited to 'llvm_tools')
-rwxr-xr-xllvm_tools/update_chromeos_llvm_next_hash.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm_tools/update_chromeos_llvm_next_hash.py b/llvm_tools/update_chromeos_llvm_next_hash.py
index da191c29..9733f7bf 100755
--- a/llvm_tools/update_chromeos_llvm_next_hash.py
+++ b/llvm_tools/update_chromeos_llvm_next_hash.py
@@ -81,11 +81,11 @@ def GetCommandLineArgs():
args_output.update_package, args_output.llvm_version)
-def GetChrootBuildPaths(chroot_path, package_list):
+def GetChrootBuildPaths(chromeos_root, package_list):
"""Gets the chroot path(s) of the package(s).
Args:
- chroot_path: The absolute path to the chroot to
+ chromeos_root: The absolute path to the chroot to
use for executing chroot commands.
package_list: A list of a package/packages to
be used to find their chroot path.
@@ -106,7 +106,7 @@ def GetChrootBuildPaths(chroot_path, package_list):
# Find the chroot path for the package.
ret, chroot_path, err = ce.ChrootRunCommandWOutput(
- chromeos_root=chroot_path, command=equery_cmd, print_to_console=False)
+ chromeos_root=chromeos_root, command=equery_cmd, print_to_console=False)
if ret: # failed to get the chroot path
raise ValueError('Failed to get chroot path for the package (%s): %s' %