aboutsummaryrefslogtreecommitdiff
path: root/llvm_tools
diff options
context:
space:
mode:
authorManoj Gupta <manojgupta@google.com>2020-04-08 17:22:21 -0700
committerManoj Gupta <manojgupta@chromium.org>2020-04-09 00:44:55 +0000
commitc76ecd6380b2de9868a47eff08b9c36a079ae3b7 (patch)
tree3b8a4750263b480735da7e255684d435c44bef15 /llvm_tools
parentada5177bc9d5f685bc0d8d7b3ff524ad06550531 (diff)
downloadtoolchain-utils-c76ecd6380b2de9868a47eff08b9c36a079ae3b7.tar.gz
llvm_tools: Fix bug in creating symlink
Pass "-r" to ln to keep the symlink relative rather than absolute. BUG=chromium:1041590 TEST=unit tests. Change-Id: I925df430abd0d25a94e17a06186ee9f503efa264 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2142920 Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: Manoj Gupta <manojgupta@chromium.org>
Diffstat (limited to 'llvm_tools')
-rwxr-xr-xllvm_tools/update_chromeos_llvm_hash.py2
-rwxr-xr-xllvm_tools/update_chromeos_llvm_hash_unittest.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm_tools/update_chromeos_llvm_hash.py b/llvm_tools/update_chromeos_llvm_hash.py
index c18e72fe..4f55a5db 100755
--- a/llvm_tools/update_chromeos_llvm_hash.py
+++ b/llvm_tools/update_chromeos_llvm_hash.py
@@ -394,7 +394,7 @@ def UprevEbuildToVersion(symlink, svn_version):
# Create a symlink of the renamed ebuild
new_symlink = new_ebuild[:-len('.ebuild')] + '-r1.ebuild'
- cmd = ['ln', '-s', new_ebuild, new_symlink]
+ cmd = ['ln', '-s', '-r', new_ebuild, new_symlink]
ExecCommandAndCaptureOutput(cmd, verbose=verbose)
if not os.path.islink(new_symlink):
diff --git a/llvm_tools/update_chromeos_llvm_hash_unittest.py b/llvm_tools/update_chromeos_llvm_hash_unittest.py
index b6d8c5da..a9f1841f 100755
--- a/llvm_tools/update_chromeos_llvm_hash_unittest.py
+++ b/llvm_tools/update_chromeos_llvm_hash_unittest.py
@@ -361,7 +361,7 @@ class UpdateLLVMHashTest(unittest.TestCase):
self.assertEqual(mock_command_output.call_args_list[0],
mock.call(expected_cmd, verbose=False))
- expected_cmd = ['ln', '-s', new_ebuild, new_symlink]
+ expected_cmd = ['ln', '-s', '-r', new_ebuild, new_symlink]
self.assertEqual(mock_command_output.call_args_list[1],
mock.call(expected_cmd, verbose=False))